variable in tooltip and the translation

Viewed 60

Would you please help me in this tooltip? It does not work.

             <div class="btn-edit-nounderline" 
 matTooltipClass="custom-tooltip" (click)="edit(row.widgetAccess)"  
 title="{{getTitle(row.widgetAccess.widgets.length)}}">

and here is the func

getTitle(editWidgetsNum) {
return this.translate.instant('Edit_WidgetsNum', {n: 
editWidgetsNum});  
}
1 Answers

You should use:

title="{{getTitle(row.widgetAccess.widgets.length)"}}"

or

[title]="getTitle(row.widgetAccess.widgets.length)"
Related