switch menu

Post Reply
Haqqi20
Posts: 3
Joined: 03 Feb 2019, 07:23

05 Feb 2019, 19:47

how to make a new menu (app-menu) move when I click Other Menu image 1: https://drive.google.com/open?id=1WbZHH ... wQDEY6sNZ7
image 2: https://drive.google.com/open?id=1ObxZM ... _2UQ85FP8L

merve7
Posts: 415
Joined: 12 Sep 2017, 10:44

11 Feb 2019, 09:26

Hi,
Sorry, but we didn't understand. Could you explain a little more what you want? (close menu? or add a new option? or adding a new menu to the old menu?)

Haqqi20
Posts: 3
Joined: 03 Feb 2019, 07:23

11 Feb 2019, 10:23

sorry if it's confusing, yeah make an old menu and a new menu.

merve7
Posts: 415
Joined: 12 Sep 2017, 10:44

11 Feb 2019, 13:11

Did you try using command attribute for the menu item and update menu model? For example;

Code: Select all

        this.model = [
            {label: 'Dashboard', icon: 'fa fa-fw fa-home', routerLink: ['/']},
            {
                label: 'Customization', icon: 'fa fa-fw fa-bars' , badge: '8', command: () => this.addMenu()
            }

Code: Select all

addMenu() {
        this.model.push({label: 'New Menu', icon: 'fa fa-fw fa-wrench', routerLink: ['/newmenu']})
    }

Post Reply

Return to “Avalon - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest