Font awesome in menu

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
alexUC
Posts: 7
Joined: 16 Sep 2021, 15:49

23 Sep 2021, 16:03

is there a possibility to use fontawesome icons in the menu?

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

02 Oct 2021, 21:01

Hi,

Yes, you can use fontawesome icons in the menu via following some steps;
1. Add fontawesome fonts and import them into the layout file.
2. Add fontawesome class name in menu icon class (the below line in app.menuitem.component.ts)

Code: Select all

<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
3. Change menuitem icons in app.menu.component.ts file
4. Run sass command for generating CSS file include font awesome classes

Code: Select all

sass --watch src/assets:src/assets --no-source-map
Best regards,
Merve Özçifçi

Post Reply

Return to “Atlantis - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests