Menu Configuration

By default, ng-admin creates a sidebar menu with one entry per entity. If you want to customize this sidebar (labels, icons, order, adding submenus, etc), you have to define menus manually.

The sidebar menu is built based on a Menu object, constructed with A menu can have child menus. A menu can be constructed based on an entity. Here is the code to create a basic menu for the entities post, comment, and tag:

The menus appear in the order in which they were added to the main menu. The Menu class offers icon(), title(), and template() methods to customize how the menu renders.
  .addChild('<span class="glyphicon glyphicon-tags"></span>'))

You can also choose to define a menu from scratch. In this case, you should define the internal state the menu points to using link(), and the function to determine whether the menu is active based on the current state with active().
        .active(function(path) {
            return path.indexOf('/stats') === 0;

You can add also second-level menus.

If the default menu template doesn't suite you, you can override it with the template() method. This will allow you, for instance, to add external links to the menu bar:
    // add custom menu
        <a href="">
            <span class="glyphicon glyphicon-list"></span>
            Go to

By default parent menus will automatically close when none of their children are active. This can be deactivated with:;

This option is global and will affect the entire menu sidebar.

Tip: is both a setter and a getter. You can modify an existing menu in the admin configuration by using

    .icon('<span class="glyphicon glyphicon-file"></span>');

results matching ""

    No results matching ""