How to replace the icons with fontawesome icons ?
Posted: 29 Dec 2018, 04:54
I want to replace all the icons in the menu and top bar with icons from font awesome as I dont find the icons I want in the theme . How do I do that ?
Code: Select all
"font-awesome": "4.7.0"
Code: Select all
"styles": [
"node_modules/primeng/resources/primeng.min.css",
"node_modules/font-awesome/css/font-awesome.min.css",
//other styles
"src/styles.scss"
],
Code: Select all
remove <i class="material-icons">more_vert</i>
add <i class="fa fa-cog"></i>
Code: Select all
{label: 'Dashboard', icon: 'fa fa-fw fa-home', routerLink: ['/']}, //with material => icon: 'dashboard'
{
label: 'Themes', icon: 'fa fa-fw fa-cog', badge: '6',
items: [
//
]
},
Code: Select all
<i *ngIf="child.icon" [ngClass]="child.icon"></i> //with material => <i *ngIf="child.icon" class="material-icons">{{child.icon}}</i>