menu.component.html
<p-menubar class="menuPerson" [model]="items"></p-menubar>
menu.component.css
.menuPerson{
background-color: olivedrab;
font-size: 14px;
}
menu.component.ts
import { Component, OnInit } from '@angular/core';
import { MenuItem } from 'primeng/components/common/menuitem';
@Component({
selector: 'menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.css']
})
export class MenuComponent implements OnInit {
items: MenuItem[];
constructor() { }
ngOnInit() {
this.items = [
{
label: 'Home',
icon: 'pi pi-fw pi-home',
routerLink: 'home'
},
{
label: 'Usuario',
icon: 'pi pi-fw pi-user',
routerLink: 'usuario'
},
{
label: 'Estados',
routerLink: 'estados'
}
];
}
}