Page 1 of 1

switch menu

Posted: 05 Feb 2019, 19:47
by Haqqi20
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

Re: switch menu

Posted: 11 Feb 2019, 09:26
by merve7
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?)

Re: switch menu

Posted: 11 Feb 2019, 10:23
by Haqqi20
sorry if it's confusing, yeah make an old menu and a new menu.

Re: switch menu

Posted: 11 Feb 2019, 13:11
by merve7
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']})
    }