Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
apurv195 opened this issue Jan 18, 2021 · 3 comments

Comments

@apurv195
Copy link

  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

@MariamKiran1996
Copy link

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

@inwaar
Copy link

inwaar commented Apr 14, 2021

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)"

@VishalvishElucidata
Copy link

in some case instead of showing the value showing [object Object]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants