Aayush Mohta
Aayush Mohta

Reputation: 64

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

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.

Upvotes: 1

Views: 101

Answers (0)

Related Questions