How can I open a tooltip from ngboostrap when openeing the compnent.
I tried called the open method in the ngOnInit function but it didn't show it.
I tried the same method in a button click an that worked (based on the sample: https://ng-bootstrap.github.io/app/components/tooltip/demos/tplwithcontext/plnkr.html )
Code:
export class TooltipComponent implements OnInit {
@ViewChild('tleft') public tooltip: NgbTooltip;
ngOnInit() {
this.tooltip.open();
}
}
Template:
<p>
<strong ngbTooltip="Tooltip on left" #tleft="ngbTooltip" triggers="manual">Tooltip is here</strong>?
</p>
<button type="button" class="btn btn-secondary" (click)="open()">
Open
</button>