sovanna / angular-material-sidenav

Simple component that reproduce the Angular Material Style SideNav Menu from their own website
http://sovanna.github.io/angular-material-sidenav/
109 stars 55 forks source link

Doesn't close on selection #5

Closed ghost closed 8 years ago

ghost commented 8 years ago

Love your component and I'm using it now. One problem I see is: when the side-menu is open in collapsible mode, it does not automatically collapse again when a menu item is selected. For example, with the top-nav showing, resize the browser window to small and collapse the side-nav. Click on the md-icon=menu and then select an item after the side-nav expands. The side-nav will not automatically collapse.

Thanks again for this wonderful directive.

sovanna commented 8 years ago

Hi, thx ;)

yeah, it was a bug but one good guy have made a pull-request, I've just merge it and make a push. you can look in the demo code how to close the menu (https://github.com/sovanna/angular-material-sidenav/pull/3)

actually, when user click on menu item, an event is fired, you can then catch it ;)

make me know if its ok for you, then i will close this issue

ghost commented 8 years ago

I will check it out today. Thanks.

sovanna commented 8 years ago

I've also move the code into the module. now, it's automatically closed and you no need to listen the event click, except if you need it.