I use angular-material. I want to hide scroll in menu. And to have just menu with fixed height. but it doesn't make height big enough to disable scroll. here is my code:
<md-toolbar ng-init="vm.hasLogged()" class="sidebar-left-toolbar" md-theme="{{::triSkin.elements.logo}}">
<md-menu md-offset="-200 56">
<h2 flex class="sidebar-left-title" ng-click="$mdOpenMenu()">{{::vm.sidebarInfo.appName}}</h2>
<md-menu-content aria-label="open menu" width="4" style="height1: 250px">
<md-menu-item >
<md-button md-prevent-menu-close="md-prevent-menu-close">
Setup
</md-button>
</md-menu-item>
<md-menu-item>
<md-button md-prevent-menu-close="md-prevent-menu-close">
Work
</md-button>
</md-menu-item>
<md-menu-divider></md-menu-divider>
<md-menu-item>
<md-button md-prevent-menu-close="md-prevent-menu-close">
Reports
</md-button>
</md-menu-item>
<md-menu-item>
<md-button md-prevent-menu-close="md-prevent-menu-close">
Workflow
</md-button>
</md-menu-item>
<md-menu-item>
<md-button md-prevent-menu-close="md-prevent-menu-close">
Cuan
</md-button>
</md-menu-item>
<md-menu-item>
<md-button md-prevent-menu-close="md-prevent-menu-close">
Admin
</md-button>
</md-menu-item>
<md-menu-item>
<md-button ng-if="vm.isLogged" ng-click="vm.logout()">
Logout
</md-button>
</md-menu-item>
</md-menu-content>
</md-menu>
I have tried with style="height: xxx" it makes menu smaller. but not bigger
You can use CSS - CodePen
CSS
The only problem with this solution is that it will affect all menus. There doesn't seem to be a way to assign a class to the menu like other AM directives.
That's an old question, but I came with the same problem.
I solve it this way:
This way, you don't need to specify the min-height and it will adapt to the content of the md-menu.