Topic: Popovers with dynamic template
<span class="counter" mdbPopoverHeader="{{'Selected Users' | translate}}" triggers="hover" [mdbPopover]="popTemplate">{{added.length}}</span>
<ng-template #popTemplate> some static <ul class="list-group z-depth-1"> <li class="list-group-item"*ngFor="let u of added">{{u.username}}</li> </ul> </ng-template>
tano pro answered 6 years ago
tano pro commented 6 years ago
for date-picker i see that the z-index remains 0, because i have onpush changedetection on the holding component. By removeing it the picker and the popup works as expected. I should have to find a workaround to use onpush.
Damian Gemza staff answered 6 years ago
<ng-template #popTemplate>Here we go: <div [innerHtml]="html"></div> </ng-template> <button id="popTemplate" type="button" class="btn btn-success waves-light" triggers="hover" mdbPopoverHeader="Dynamic html inside" [mdbPopover]="popTemplate" mdbWavesEffect> Show me popover with html </button>
public html: string = '<span class="btn btn-danger">Your HTML here</span>';
tano pro answered 6 years ago
bitmads pro premium answered 5 years ago
Pff he has disappeared, same issue here.
Arkadiusz Idzikowski staff commented 5 years ago
There were many changes many changes in component loading and change detection since version 6, but we will take a closer look at again.
Arkadiusz Idzikowski staff commented 5 years ago
We tried to reproduce this problem on our end with the code provided in this thread but without success.
Which version of MDB Angular do you use? Please provide some example html/ts code that is not working and more details about reproduction steps.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: HP
- Browser: Chrome
- OS: Win10
- Provided sample code: No
- Provided link: No