i want to user angular-fontawesome in menu, can you make a sample how to modify it so i can modify this
{label: 'Company', icon: 'fa fa-fw fa-building', routerLink: ['/company']},
to user angular-fontawesome
thanks for your help
Using angular-fontawesome
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
Hi,
You can use angular font-awesome with the below steps;
1) Please, firstly add the icon as like this guideline; https://github.com/FortAwesome/angular-fontawesome
2)Replace the menu icon with the new icon in the model property(in app.menu.component.ts);
3) Replace <i> tag with <fa-icon> (line 198 and line 208 in app.menu.component.ts);
You can use angular font-awesome with the below steps;
1) Please, firstly add the icon as like this guideline; https://github.com/FortAwesome/angular-fontawesome
2)Replace the menu icon with the new icon in the model property(in app.menu.component.ts);
Code: Select all
this.model = [
{label: 'Dashboard', icon: faCoffee, routerLink: ['/']},
{
label: 'Menu Modes', icon: faCoffee,
items: [
{label: 'Static Menu', icon: faCoffee},
{label: 'Overlay Menu', icon: faCoffee},
{label: 'Slim Menu', icon: faCoffee},
{label: 'Light Menu', icon: faCoffee},
{label: 'Dark Menu', icon: faCoffee}
]
}
]
Code: Select all
<i [ngClass]="child.icon"></i> //remove this
<fa-icon [icon]="child.icon"></fa-icon> //add this
Just a note. When using the newest version of the Harmony theme the icon definition was in the app.menuitem.component.ts file.
Replaced:
with
Remember to replace it in both spots in the template!
Replaced:
Code: Select all
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
Code: Select all
<fa-icon [icon]="item.icon" class="p-mr-2"></fa-icon>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot for your update!
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests