ng2-tooltip-directive icon indicating copy to clipboard operation
ng2-tooltip-directive copied to clipboard

getting Type 'TemplateRef<any>' is not assignable to type 'string'. in Angular 10

Open apurv195 opened this issue 4 years ago • 3 comments

  1. i am using ng2-tooltip-directive = 2.9.22 version in angular 10
  2. getting compiling error Type 'TemplateRef' is not assignable to type 'string'.
  3. here is my code

<div [tooltip]="auditoriumTooltip" [content-type]="'template'" [hide-delay]="0"> <ng-template #auditoriumTooltip> <p> {{auditoriumListSecondSectionNew.name}} </p> <p> Description : {{auditoriumListSecondSectionNew.description}} </p> </ng-template> </div> i don't know where is the issue

apurv195 avatar Jan 18 '21 13:01 apurv195

Facing the same issue. Is there anybody following this issue?

MariamKiran1996 avatar Mar 12 '21 06:03 MariamKiran1996

Unfortunately the library is not going well with enabled strictTemplates that used by default from some version of Angular. The same problem is for theme="dark" since it has theme: boolean; type in the lib - as a result it's can not be compiled at all.

But you could workaround it and hope it's fixed someday:

[tooltip]="$any(auditoriumTooltip)"

inwaar avatar Apr 14 '21 11:04 inwaar