How to use template in PrimeNG panelMenu

Viewed 3228

I need to add some html code in menu entries so I try to use to custom the display :

My template :

<p-panelMenu styleClass="main-menu" class="main-menu" [model]="menus">
    <ng-template let-menus pTemplate>
        {{menus.label}} <span>otherStuff</span>
    </ng-template>
</p-panelMenu>

The component :

this.menus = [
        {
          label: 'Dashboard',
          icon: 'fa-home',
          routerLink: '/home'
        },
    ...

Nothing happen and it still display the menu as if I didn't add the template. What do I miss?

2 Answers

As of the current implementation, you can't. One option is to override the component and add that functionality yourself.

Related