खुला हुआ बंद किया हुआ

Angular:How to build all menus from the database #224


User avatar
0
BennieMok बनाया था

Hi, I want to build all menus from the table of the database instead of from the code.Because my customer maybe add new menu from the system.Any ideas?Thanks.


5 उत्तर (ओं)
  • User Avatar
    0
    liangshiwei बनाया था
    सहायता दल Fullstack Developer

    Hi,

    The current design of the menu does not consider persistence to the database, you need to do some work for this.

    1. You need to create an entity that is compatible with ApplicationMenu.

    2. Create a service that persists all menus to the database when the application is initialized(If the menu is not in the database table)

    3. Custom DatabaseMenuManager to replace MenuManager and get the menu from the database(should be filtered based on the current user).

  • User Avatar
    0
    BennieMok बनाया था

    Hi, I used angular ui as a front end.So I want to know how to add new menu in front end.Can you give me an example?Thanks.

  • User Avatar
    0
    alper बनाया था
    सहायता दल Director

    you can create a new application service to get your menu items and create your own main menu in Angular.

    added @mehmet to the conversation. @mehmet can you point out where Bennie can build the Angular main menu. he wants to create the main menu from database (host)

  • User Avatar
    0
    Mehmet बनाया था

    Hi @BennieMok

    See the Modifying the Menu document.. This will help you.

  • User Avatar
    0
    BennieMok बनाया था

    Hello, Ok , I try to do this . But I wish you consider to add a new feature of this. It's very useful for us . Thanks

Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11