aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/customTooltip/custom-tooltip.component.ts
blob: a8163a6d8723b9d14af31c3ad51bab5f5ca47ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import {AfterViewInit, Component, ViewChild, ViewContainerRef} from "@angular/core";
import {BehaviorSubject} from "rxjs";

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

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

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

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