I am facing some problems while implementing nested menu within a toolbar in Angular Material:
- The main menu list is placed over the button that tiggers it and not under it, as shown in the official documentation
- There is nothing that indicates that an item of the menu contains a submenu list (some kind of arrow for example)
- When I implement a submenu list, the main list of the menu disappears once a submenu is clicked, (You can take the example of my code below tested in a small resolution: when the 'Manage' menu is clicked it shows the Products and the Staff list, but the main list of the menu that contains the 'Manage' item disappears)
This is my implementation:
<md-toolbar color="primary">
<button md-button routerLink="/">
<md-icon> home </md-icon>
<span> Home </span>
</button>
<div fxLayout="row" fxShow="false" fxShow.gt-sm>
<button md-button [mdMenuTriggerFor]="administration">
<span> Manage </span>
</button>
<button md-button routerLink="/help">
<md-icon> help_outline </md-icon>
<span> Help </span>
</button>
</div>
<button md-button [mdMenuTriggerFor]="menu" fxHide="false" fxHide.gt-sm>
<md-icon> more_vert </md-icon>
</button>
</md-toolbar>
<md-menu #administration="mdMenu">
<button md-menu-item routerLink="/products">
<span> Products </span>
</button>
<button md-menu-item routerLink="/staff">
<span> Staff </span>
</button>
</md-menu>
<md-menu xPosition="before" #menu="mdMenu">
<button md-menu-item [mdMenuTriggerFor]="administration">
<span> Manage </span>
</button>
<button md-menu-item routerLink="/help">
<span> Help </span>
</button>
</md-menu>
The behavior that I am looking for is native in the MenuBar component of AngularJS Material, and since Angular Material is still in its beta version, I am wondering if there is some problem in my code or do I just have to wait the improvement of this component in a next version of the framework.