Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SpeederX opened this issue Jan 11, 2025 · 3 comments
Open

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

SpeederX opened this issue Jan 11, 2025 · 3 comments
Labels
area: material/sidenav docs This issue is related to documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@SpeederX
Copy link

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

@SpeederX SpeederX added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels Jan 11, 2025
@crisbeto
Copy link
Member

I think we should just remove the router link from the example since it isn't serving any documentation purposes.

@SpeederX
Copy link
Author

Didn't think it was just that.. amazing. Can I do that with a PR?

@crisbeto
Copy link
Member

Yep, feel free to send a PR.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/sidenav and removed needs triage This issue needs to be triaged by the team labels Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav docs This issue is related to documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

2 participants