angular / angular/components

[Sidenav] Issue when container and sidenav in different components

Open
#8,959 6 comments 10 reactions 0 assignees View on GitHub
area: material/sidenav feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Bug, feature request, or proposal:
I have the template like this:
``
` `
`...`
``

`` is:
``
` ...`
``

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 and and it break the css rules.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular Material 5.0.1

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported template with Angular Material 5.0.1, placing the mat-sidenav-container and mat-sidenav in separate components, then compare it with the same-component arrangement. Done means mode="side" remains effective when the sidenav is nested in my-component instead of switching to mode="over".

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.