Tooltip buttons not working as expected/ Tooltip Closing when button is clicked

30 views Asked by At

I have a button which opens ngbTooltip on click. Inside ngbTooltip I have a button which should console log a string. Clicking on the button inside the tooltip only closes the tooltip but no string is logged in the console.

<button 
[ngbTooltip]="popContent" 
placement="right" 
triggers="click"> Xyz </button>

<ng-template #popContent><div>
 <button (click)="download()">abc</button>
</div></ng-template>

download(){
 console.log('Clicked');
}

I have tried using [autoClose]="'outside'" but it did not help. Any help would be highly appreciated.

0

There are 0 answers