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

Method addControl

packages/forms/src/model/form_group.ts:287–297  ·  view source on GitHub ↗
(
    name: K,
    control: Required<TControl>[K],
    options: {
      emitEvent?: boolean;
    } = {},
  )

Source from the content-addressed store, hash-verified

285 ): void;
286
287 addControl<K extends string & keyof TControl>(
288 name: K,
289 control: Required<TControl>[K],
290 options: {
291 emitEvent?: boolean;
292 } = {},
293 ): void {
294 this.registerControl(name, control);
295 this.updateValueAndValidity({emitEvent: options.emitEvent});
296 this._onCollectionChange();
297 }
298
299 removeControl(
300 this: FormGroup<{[key: string]: AbstractControl<any>}>,

Callers

nothing calls this directly

Calls 2

registerControlMethod · 0.95

Tested by

no test coverage detected