Topic: mdbTooltip with ng-template does not work anymore?
Expected behavior
When passing an ng-template reference to the mdbTooltip input param it should render the template correctly.
Actual behavior
When passing an ng-template reference with strictTemplates option "on" it just converts the reference to an string returning "[object Object]"
Resources (screenshots, code snippets etc.)
Example code:
<div class="col-1 p-2 text-center" *ngFor="let a of item.achievements" @fade>
<span><img [mdbTooltip]="$any(atooltip)"
[src]="a.achieved ? (a.iconUrl) : (a.iconGreyUrl)" class="img-fluid" /></span>
<ng-template #atooltip>
<span class="fl-0 fw-bold">{{a.displayName}}</span><br />
<span class="fl-0">{{a.description}}</span>
</ng-template>
</div>
</div>
Arkadiusz Idzikowski staff answered 2 years ago
This feature is currently available only in mdbPopover
directive. Tooltips do not have support for ng-template
yet.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 4.0.0
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No