Base solution for your next web application
Open Closed

Request for Guidance on Implementing Menu Toggle in Angular with ASP.NET Zero #12224


User avatar
0
pliaspzero created

V13.4:

Dear ASP.NET Zero Support Team,

I hope this message finds you well. We are currently using the ASP.NET Zero framework with Angular as our front-end and ASP.NET Core for our backend.

We are looking to implement a feature in our application that allows users to access specific components through the menu and directly via URL, while toggling the visibility of the menu. Here’s a brief overview of our requirements, including examples:

Menu Navigation: When a user navigates to https://<myApp>/app/area1/dispositions, the component is displayed with the menu visible.

Direct Access Without Menu: We want to allow users to access the same component directly via https://<myApp>/dispositions, where the menu is hidden, providing a cleaner view of the component.

Expand/Collapse Functionality:
    Each menu item should have an expand icon (using Font Awesome) that, when clicked, takes the user to the component's URL without the menu.
    Inside the component, there should be a collapse icon that, when clicked, navigates back to the original URL with the menu displayed.

We would greatly appreciate any guidance, best practices, or examples you could provide to help us set up this functionality effectively. Your support is invaluable to us as we continue to develop our application.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pliaspzero

    I have't tried this but I think you can use different routes for the same component. Then, you can decide in layout to hide/show menu by looking at the given route.