ng template binding with button tooltip is not working

3.8k views Asked by At

tolTemplate is not getting bind with [tooltip]

<ng-template #tolTemplate>
  Just another: 
</ng-template>
<button type="button" class="btn btn-success" [tooltip]="tolTemplate">
  Show me tooltip with html
</button>

Any idea, how to resolve this.

enter image description here\

1

There are 1 answers

0
Adam On

Try to add to button attribute contentType or content-type (depends on version angular).

<ng-template #tolTemplate>
  Just another: 
</ng-template>
<button type="button" class="btn btn-success" [tooltip]="tolTemplate" contentType="template">
  Show me tooltip with html
</button>