aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/tooltip/tooltip-template.component.ts
blob: 7cb7f72cffecbc5f638925cf684d05c1c1edb2d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Component, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';

@Component({
    selector: 'tooltip-template',
    template: `
    <div class="sdc-tooltip-template-container">
        <ng-container #templateContainer></ng-container>
    </div>`
})

export class TooltipTemplateComponent implements AfterViewInit {
    @ViewChild('templateContainer', {read: ViewContainerRef}) public container: ViewContainerRef;

    public viewReady: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);

    ngAfterViewInit() : void {
        this.viewReady.next(true);
    }
}