Custom icon inside main menu is not working

Post Reply
epsino
Posts: 2
Joined: 10 Jun 2015, 13:33

27 May 2020, 23:42

Hi,

I want to put inside main menu a custom icon, I import a custom icon font into the project and define as ui-icon like the ultima documentation says.
The icon works great into other components like a button, but is not visible inside the ultima main menu.

Is it possible ?

Best regards
Andrés

merve7
Posts: 681
Joined: 12 Sep 2017, 10:44

06 Jul 2020, 14:43

Hi,
It is not visible because of the menu icon class defined as material-icons. You can use custom icon with changing i tags in app.menuitem.component.ts but we recommend using material icons.

epsino
Posts: 2
Joined: 10 Jun 2015, 13:33

22 Jul 2020, 03:35

Thank you very much for your suggestion, i add this

<i *ngIf="item.icon && !item.icon.startsWith('mdi')" class="material-icons">{{item.icon}}</i>
<i *ngIf="item.icon && item.icon.startsWith('mdi')" class="mdi {{item.icon}}"></i>

... and work perfectly.

Thank you !

mert.sincan
Posts: 4638
Joined: 29 Jun 2013, 12:38

09 Oct 2020, 22:27

Thanks a lot, @merve7 ;)

Best Regards,

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest