import {AfterViewInit, Component, ViewChild, ViewContainerRef} from "@angular/core"; import {BehaviorSubject} from "rxjs"; @Component({ selector: 'tooltip-template', template: `
` }) export class TooltipTemplateComponent implements AfterViewInit { @ViewChild('templateContainer', {read: ViewContainerRef, static: true}) public container: ViewContainerRef; public viewReady: BehaviorSubject = new BehaviorSubject(false); ngAfterViewInit() : void { this.viewReady.next(true); } }