Topic: mdbTooltip with ng-template does not work anymore?

malte premium asked 1 year ago


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>


This feature is currently available only in mdbPopover directive. Tooltips do not have support for ng-template yet.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • 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