MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/material/chips/chip-grid.ts:256–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 }
255
256 constructor() {
257 super();
258
259 const parentForm = inject(NgForm, {optional: true});
260 const parentFormGroup = inject(FormGroupDirective, {optional: true});
261 const defaultErrorStateMatcher = inject(ErrorStateMatcher);
262 const formField = inject(FORM_FIELD, {optional: true, self: true});
263
264 if (this.ngControl) {
265 this.ngControl.valueAccessor = this;
266 }
267
268 this._errorStateTracker = new _ErrorStateTracker(
269 defaultErrorStateMatcher,
270 formField || this.ngControl,
271 parentFormGroup,
272 parentForm,
273 this.stateChanges,
274 );
275 }
276
277 ngAfterContentInit() {
278 this.chipBlurChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected