Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Angular Material, how to md-sidenav always open

visible toggle button and close it whenever I want?

I've done several attempts and failed.

I uploaded the picture as it is today, but it does not toggle, only at lower resolutions.

Any idea how to do this?

enter image description here

like image 270
Marco Riesco Avatar asked Jul 24 '15 21:07

Marco Riesco


People also ask

How to use sidenav in Angular Material?

Specifying the main and side contentBoth the main and side content should be placed inside of the <mat-sidenav-container> , content that you don't want to be affected by the sidenav, such as a header or footer, can be placed outside of the container. The side content should be wrapped in a <mat-sidenav> element.

How to close sidenav Angular Material?

close() you get closing only if in over mode. Show activity on this post. Adding (click)="sidenav. close()" along with the routerLink="/whatever/path/here" works.


1 Answers

I had a lot of trouble finding a way to do this in material2. Finally, I found this way reading the source code:

<md-sidenav opened="true" disableClose="true">
like image 91
Gabriel Avatar answered Sep 19 '22 10:09

Gabriel