From d56daaafc1a08822025afd70b110936e000dae3f Mon Sep 17 00:00:00 2001 From: "aditya.chandel" <> Date: Sat, 21 Dec 2024 20:28:40 -0700 Subject: [PATCH] Fix Menu component --- .../component/layout/app.menu.component.ts | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/booklore-ui/src/app/book/component/layout/app.menu.component.ts b/booklore-ui/src/app/book/component/layout/app.menu.component.ts index f487fc390..5f251bd8e 100644 --- a/booklore-ui/src/app/book/component/layout/app.menu.component.ts +++ b/booklore-ui/src/app/book/component/layout/app.menu.component.ts @@ -12,6 +12,24 @@ import {LibraryAndBookService} from '../../service/library-and-book.service'; export class AppMenuComponent implements OnInit { 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(() => { const libraries = this.libraryBookService.libraries(); return [ @@ -41,12 +59,4 @@ export class AppMenuComponent implements OnInit { }, ]; }); - - constructor(private libraryBookService: LibraryAndBookService) { - - } - - ngOnInit() { - this.populateHome(); - } }