I'm trying to link my typescript with my the hide method from ngx-bootstrap, in my project I am running multiple functions and it will close all together when the user click the x button in the popover, myfunction() in the typescript will run and trigger the hide method pop2.hide().
<div>
<ng-template #popoverContent3>
<div style="font-size:18px; font-family:'Times New Roman'; font-weight:bold;">
<p>Fun with ngx-bootstrap
<button type="button" (click)='pop2.hide()' class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</p>
</div>
<div>
<p>Trying to make typescript call the function pop2.hide()</p>
</div>
</ng-template>
<br><br><br><br><br><br><br>
<a [popover]="popoverContent3" #pop2="bs-popover" (click)="isOpen = !isOpen" [outsideClick]="false" placement="right">
Make typescript call the function pop2.hide()
</a>
</div>
This is the code from plunker, the x button.
<button type="button" (click)='pop2.hide()' class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
myfunction(){
pop2.hide();//needs to work!
}