[Sidenav] Issue when container and sidenav in different components
See original GitHub issueBug, feature request, or proposal:
I have the template like this:
<mat-sidenav-container class="sidenav-container">
<my-component></my-component>
...
</mat-sidenav-container>
<my-component>
is:
<mat-sidenav #leftSidenav class="sidenav" mode="side" [opened]="true">
...
</mat-sidenav>
When I have my sidenav in two components like this, the mode “side” is not working anymore. The mode switch to “over”. When I have all in the same component, it’s working.
I think it’s due to a another tag between <mat-sidenav-container> and <mat-sidenav> and it break the css rules.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular Material 5.0.1
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:6 (3 by maintainers)
Top Results From Across the Web
angular - Issue when mat-sidenav-container and ...
I have separated out mat-sidenav-container and mat-sidenav into two different components. When I have my sidenav in two components like this ...
Read more >I want to re-use a sidenav in multiple components. Anyone ...
So I have one "home" component, one "Contact", one "sidenav" and one "toolbar". I want the "sidenav" component to display everything inside ...
Read more >Sidenav
The sidenav components are designed to add side content to a fullscreen app. To set up a sidenav we use three components: <mat-sidenav-container>...
Read more >Angular Material2 Sidenav Issue (forked)
Small project to demonstrate vertical tabs using Angular Material 2.
Read more >Angular Material: toolbar and sidenav - Rob Ferguson
After looking at the @angular/material:material-nav starter component's sample code I decided to generate a toolbar component and a sidenav ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This use case is not currently supported, instead you would do something like this:
I would also love to see this split-up!