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

Method ngAfterContentInit

src/material/stepper/stepper.ts:84–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 _portal!: TemplatePortal;
83
84 ngAfterContentInit() {
85 this._isSelected = this._stepper.steps.changes
86 .pipe(
87 switchMap(() => {
88 return this._stepper.selectionChange.pipe(
89 map(event => event.selectedStep === this),
90 startWith(this._stepper.selected === this),
91 );
92 }),
93 )
94 .subscribe(isSelected => {
95 if (isSelected && this._lazyContent && !this._portal) {
96 this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef!);
97 }
98 });
99 }
100
101 ngOnDestroy() {
102 this._isSelected.unsubscribe();

Callers 1

ngAfterContentInitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected