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

Method constructor

src/material/checkbox/checkbox.ts:238–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236 private _validatorChangeFn = () => {};
237
238 constructor() {
239 inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
240 const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});
241 this._options = this._options || checkboxDefaults;
242 this.color = this._options.color || checkboxDefaults.color;
243 this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;
244 this.id = this._uniqueId = inject(_IdGenerator).getId('mat-mdc-checkbox-');
245 this.disabledInteractive = this._options?.disabledInteractive ?? false;
246 }
247
248 ngOnChanges(changes: SimpleChanges<this>) {
249 if (changes['required']) {

Callers

nothing calls this directly

Calls 2

loadMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected