drozhzhin-n-e / ng2-tooltip-directive

The tooltip is a pop-up tip that appears when you hover over an item or click on it.
http://ivylab.space/tooltip
MIT License
102 stars 76 forks source link

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

Open apurv195 opened 3 years ago

apurv195 commented 3 years ago
  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>

{{auditoriumListSecondSectionNew.name}}

        <p> Description : {{auditoriumListSecondSectionNew.description}}
        </p>
    </ng-template>
</div>`

i don't know where is the issue

MariamKiran1996 commented 3 years ago

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

inwaar commented 3 years ago

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 commented 7 months ago

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