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

Method ngAfterContentInit

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

Source from the content-addressed store, hash-verified

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

Callers 1

ngAfterContentInitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected