MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

packages/forms/src/directives/ng_form.ts:164–180  ·  view source on GitHub ↗
(
    @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],
    @Optional()
    @Self()
    @Inject(NG_ASYNC_VALIDATORS)
    asyncValidators: (AsyncValidator | AsyncValidatorFn)[],
    @Optional()
    @Inject(CALL_SET_DISABLED_STATE)
    private callSetDisabledState?: SetDisabledStateOption,
  )

Source from the content-addressed store, hash-verified

162 @Input('ngFormOptions') options!: {updateOn?: FormHooks};
163
164 constructor(
165 @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],
166 @Optional()
167 @Self()
168 @Inject(NG_ASYNC_VALIDATORS)
169 asyncValidators: (AsyncValidator | AsyncValidatorFn)[],
170 @Optional()
171 @Inject(CALL_SET_DISABLED_STATE)
172 private callSetDisabledState?: SetDisabledStateOption,
173 ) {
174 super();
175 this.form = new FormGroup(
176 {},
177 composeValidators(validators),
178 composeAsyncValidators(asyncValidators),
179 );
180 }
181
182 /** @docs-private */
183 ngAfterViewInit() {

Callers

nothing calls this directly

Calls 5

OptionalInterface · 0.90
SelfInterface · 0.90
InjectInterface · 0.90
composeValidatorsFunction · 0.90
composeAsyncValidatorsFunction · 0.90

Tested by

no test coverage detected