Fix Menu component
This commit is contained in:
@@ -12,6 +12,24 @@ import {LibraryAndBookService} from '../../service/library-and-book.service';
|
|||||||
export class AppMenuComponent implements OnInit {
|
export class AppMenuComponent implements OnInit {
|
||||||
home: any[] = [];
|
home: any[] = [];
|
||||||
|
|
||||||
|
constructor(private libraryBookService: LibraryAndBookService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.populateHome();
|
||||||
|
}
|
||||||
|
|
||||||
|
populateHome() {
|
||||||
|
this.home = [
|
||||||
|
{
|
||||||
|
label: 'Home',
|
||||||
|
items: [
|
||||||
|
{label: 'Dashboard', icon: 'pi pi-fw pi-home', routerLink: ['/']},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
libraryMenu = computed(() => {
|
libraryMenu = computed(() => {
|
||||||
const libraries = this.libraryBookService.libraries();
|
const libraries = this.libraryBookService.libraries();
|
||||||
return [
|
return [
|
||||||
@@ -41,12 +59,4 @@ export class AppMenuComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
constructor(private libraryBookService: LibraryAndBookService) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.populateHome();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user