1import { Component } from '@angular/core';
2import { NbMenuService, NbMenuItem } from '@nebular/theme';
3
4@Component({
5 selector: 'app-pages',
6 template: `
7 <app-layout>
8 <nb-menu [items]="menu"></nb-menu>
9 <router-outlet></router-outlet>
10 </app-layout>
11 `,
12})
13export class PagesComponent {
14 menu = [];
15 newMenuItem: NbMenuItem[] = [
16 {
17 title: 'Home',
18 icon: 'ion-home',
19 link: 'app/home',
20 home: true,
21 }]
22 constructor( private nbMenuService: NbMenuService ) {
23 this.nbMenuService.addItems(this.newMenuItem);
24 }
25}
26