Material: sidenav not closing itself after clicking the links in md-list

Created on 17 Feb 2016  路  6Comments  路  Source: angular/material

after clicking the links in sidenav , the view of the page content changes , but the sidenav remains open
here is my sidenav template

sidenav.html

works as expected

Most helpful comment

@rishabh1403 afaik, the click event bubbles up the DOM, so you could put just one ng-click="closeSidenav()" on an element that encloses your links.

All 6 comments

yep, you have to toggle/close it yourself if needed. You can have anything on the sidenav, so its depends on your case if you want to close it or not

so if i understood you right , i will also have to apply a ng-click(with toogle function) along with ui-sref on every link i have on side nav ?

@rishabh1403 afaik, the click event bubbles up the DOM, so you could put just one ng-click="closeSidenav()" on an element that encloses your links.

@outofrange thanks :+1: worked

But if the sidenav has md-is-locked-open="$mdMedia('gt-xs')"- it means sometimes it's always open and you don't want it to "close" ... so how do I know in which device I am ? because on every device the sidenav is either always open or closed

@arLevi there are better avenues for troubleshooting or asking for help. These include Stack Overflow, Gitter, the AngularJS Material forums, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

achaussende picture achaussende  路  3Comments

buzybee83 picture buzybee83  路  3Comments

ddimitrop picture ddimitrop  路  3Comments

chriseyhorn picture chriseyhorn  路  3Comments

robertmesserle picture robertmesserle  路  3Comments