Switching between Static and Slim menu orientation on side bar toggle

Post Reply
kdhorizon
Posts: 2
Joined: 11 Feb 2020, 21:46

23 May 2020, 05:10

Hi,

Hope you are doing good.

I'm using Avalon layout in my angular application. I am trying to change the code in onMenuButtonClick function in app.main.component.ts, to show a slim menu with icons on collapse of side bar and static menu when side bar is expanded. I'm not able to do so.

Could you kindly suggest an optimal way to achieve this?

yigitfindikli
Posts: 382
Joined: 08 Aug 2018, 14:09

04 Jun 2020, 17:54

kdhorizon wrote:
23 May 2020, 05:10
Hi,

Hope you are doing good.

I'm using Avalon layout in my angular application. I am trying to change the code in onMenuButtonClick function in app.main.component.ts, to show a slim menu with icons on collapse of side bar and static menu when side bar is expanded. I'm not able to do so.

Could you kindly suggest an optimal way to achieve this?
Hi,

Can you try this;

in app.main.component.ts (onMenuButtonClick changed)

Code: Select all

onMenuButtonClick(event) {
        this.menuClick = true;
        this.rotateMenuButton = !this.rotateMenuButton;
        this.topbarMenuActive = false;

        
        if (this.isDesktop()) {
            if (this.layoutMode === MenuOrientation.STATIC){
                this.changeToSlimMenu();
            }
            else {
                this.changeToStaticMenu();
            } 
        } 
        else {
            this.staticMenuMobileActive = !this.staticMenuMobileActive; 
        }

        event.preventDefault();
    }
delete this class from main.scss

Code: Select all

.topbar-right {
                    #menu-button {
                        display: none;
                    }
                }
Regards.

Post Reply

Return to “Avalon - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests