Skip to content

docs-bug(Sidenav): stackblitz example not loading #30307

Closed
@SpeederX

Description

@SpeederX

Documentation Feedback

Hi!

Context:
I was having a look at Sidenav example page and I stumbled upon this bug while loading the Stackblitz. Basically the example doesn't load the content as it triggers a Nullinjector for ActivatedRoute from the console log trace.

Proposed solution
After some try I noticed that giving provideRouter([]) in the main.ts would fix the problem.

From my understanding in angular/components, the setup is provided from this file.
angular/components/.../material.angular.io/src/assets/stack-blitz/src/main.ts
I think this solution might affect also other example environment for stackblitz in general, so I'm asking if this can be achieved this way without messing other things or there are other possible solution that would not affect as much.

This is the first issue I open here and I was wondering if this can be open to contribution also.

Affected documentation page

https://material.angular.io/components/sidenav/overview#creating-a-responsive-layout-for-mobile--desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sidenavdocsThis issue is related to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions