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

Method ngOnInit

src/cdk/tree/tree.ts:1392–1405  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1390 }
1391
1392 ngOnInit(): void {
1393 this._parentNodeAriaLevel = getParentNodeAriaLevel(this._elementRef.nativeElement);
1394 this._tree
1395 ._getExpansionModel()
1396 .changed.pipe(
1397 map(() => this.isExpanded),
1398 distinctUntilChanged(),
1399 takeUntil(this._destroyed),
1400 )
1401 .pipe(takeUntil(this._destroyed))
1402 .subscribe(() => this._changeDetectorRef.markForCheck());
1403 this._tree._setNodeTypeIfUnset(this._type);
1404 this._tree._registerNode(this);
1405 }
1406
1407 ngOnDestroy() {
1408 // If this is the last tree node being destroyed,

Callers

nothing calls this directly

Calls 5

getParentNodeAriaLevelFunction · 0.85
_getExpansionModelMethod · 0.80
markForCheckMethod · 0.80
_setNodeTypeIfUnsetMethod · 0.80
_registerNodeMethod · 0.80

Tested by

no test coverage detected