-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I want to make a dynamic sidebar menu. For the test, I created a method changeMenu() in default-layout.component.ts.
I made the following changes (coreui-free-angular-admin-template-2.0.0-rc.4):
default-layout.component.html
<a class="nav-link" href="#" (click)="changeMenu()">Dashboard</a>
default-layout.component.ts
public changeMenu() { this.navItems = [ { name: 'Dashboard', url: '/dashboard', icon: 'icon-speedometer', badge: { variant: 'info', text: 'NEW' } } ]; }
I'm changing the array navItems. However, a strange bug occurs. A new item is added to the menu, and the old ones do not disappear.
Metadata
Metadata
Assignees
Labels
No labels