MCPcopy Index your code
hub / github.com/angular/components / ngOnInit

Method ngOnInit

src/material/sort/sort-header.ts:139–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137 }
138
139 ngOnInit() {
140 if (!this.id && this._columnDef) {
141 this.id = this._columnDef.name;
142 }
143
144 this._sort.register(this);
145 this._renderChanges = merge(this._sort._stateChanges, this._sort.sortChange).subscribe(() =>
146 this._changeDetectorRef.markForCheck(),
147 );
148 this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container')!;
149 this._updateSortActionDescription(this._sortActionDescription);
150 }
151
152 ngAfterViewInit() {
153 // We use the focus monitor because we also want to style

Callers

nothing calls this directly

Calls 3

markForCheckMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected