sidenav collapse to show icons?

1,255 views
Skip to first unread message

kth...@avioconsulting.com

unread,
Mar 2, 2017, 9:10:25 AM3/2/17
to angular-material2
Is it possible to just show the md-icon from the md-nav-list when collapsed?

<md-nav-list>
 
<md-list-item *ngFor="let link of links">
   
<md-icon md-list-avatar>{{link.icon}}</md-icon>
   
<a md-line routerLink="{{link.path}}">{{link.name}}</a>
 
</md-list-item>
 
<md-divider></md-divider>
 
<md-list-item>
   
<md-icon md-list-avatar>help</md-icon>
   
<a md-line routerLink="help">Help</a>
 
</md-list-item>
</md-nav-list>

Example:

Michael Prentice

unread,
Apr 16, 2017, 2:13:54 AM4/16/17
to angular-material2
Yes, it's possible to add this kind of custom behavior to your application. You will need to do it yourself though as there is no feature like that supported by Angular Material out of the box.

This is unlikely to be added to Angular Material since it is not part of the Material Design SideNav spec.

Michael Prentice

Markus Thiel

unread,
Sep 29, 2017, 2:02:59 PM9/29/17
to angular-material2
This is an upcoming feature but will most likely be a while until it gets developed

kedar teni

unread,
Oct 3, 2017, 1:13:18 AM10/3/17
to angular-material2
Reply all
Reply to author
Forward
0 new messages