2
votes

I see a sub-menu working in the "menu bar" example - https://material.angularjs.org/latest/demo/menuBar

There are no examples of sub-menus for the actual menu component.

I looked at the menu bar example and it uses md-menu, so it should be supported in the regular menu, right? I tried it and it breaks the entire menu (top level also stops working).

I'm guessing that it's just not supported? I found this discussion, but I'm not sure what to make of it.

2

2 Answers

2
votes

Check here, there are sub-menu in this example. version 1.0.5

0
votes
    <md-menu-item>

        <md-menu style="padding:0px;">

            <md-menu-item>

                <!-- ACCOUNT SETTINGS -->
                <md-button ng-click="$mdOpenMenu()">
                    <md-icon md-font-set="md">assignment_ind</md-icon>
                    Account Settings
                </md-button>

            </md-menu-item>

            <!-- SUBMENU-->
            <md-menu-content>

                <!-- CHANGE PASSWORD -->
                <md-menu-item>
                    <md-button>
                        <md-icon md-font-set="md">security</md-icon>
                        Change Pasword
                    </md-button>
                </md-menu-item>

                <!-- DELETE ACCOUNT -->
                <md-menu-item>
                    <md-button>
                        <md-icon md-font-set="md">delete_forever</md-icon>
                        Delete Account
                    </md-button>
                </md-menu-item>

            </md-menu-content>

        </md-menu>

    </md-menu-item>