Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Dynamically add new item in the menu without reloading page #10757


User avatar
0
razkhan78 created

Hi

We are using AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core

We are working on a new feature where we have a need to dynamically add new item in the menu without reloading page. We have look through some documents and found there is one javascript API called abp.nav.menus.MainMenu but there are no methods we can find right now to make a call and get updated menu.

So could you please let us know if there is anyway we can refresh menu without reloading the entire page?


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

    Hi @razkhan78

    Thank you for your question. This is not supported at the moment. To implement such a feature, you can take a look at https://www.ngxs.io/ or https://ngrx.io/

  • User Avatar
    0
    razkhan78 created

    @ismcagdas We are using jQuery not angular.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @razkhan78

    Sorry, it is my mistake. In that case, you can use two approaches.

    If the menu item addition is decided on server side, you can use SignalR to fire an event and handle it on client side.

    If it is determined on client side, you can use client side event bus, see https://aspnetboilerplate.com/Pages/Documents/Javascript-API/Event-Bus