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