Skip to content

help(Sidenav): how to code a sidenav like material.angular.io did #19163

@hylerrix

Description

@hylerrix

What are you trying to do?

I`m trying to write a Sidenav skeleton demo, just like official document navigation skeleton(A menu in the left part and content body in the right part with overview\api\examples tabs):

And I`m new to Angular, I cannot figure out how to code this Sidenav skeleton, and I can not find where is the relevant source code about this skeleton after I cloning this repo.

If anyone can help me, I'll be much appreciated. 😁

What troubleshooting steps have you tried?

I have already read the Sidenav Document, and still don't understand.

Because according to this document, I need to code Sidenav as follows, but in Official Sidenav skeleton, it's class called docs-component-viewer-nav-content ng-tns-c139-5 rather than mat-drawer-inner-container ng-tns-c36-0:

<mat-sidenav-container class="example-container" *ngIf="shouldRun">
  <mat-sidenav mode="side" opened>Sidenav content</mat-sidenav>
  <mat-sidenav-content>Main content</mat-sidenav-content>
</mat-sidenav-container>

Reproduction

As above, I use the mat-sidenav-container tag but don't know how to realize the Sidenav style of the official website one by one.

Environment

  • Angular: ~9.1.0
  • CDK/Material:^9.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    troubleshootingThis issue is not reporting an issue, but just asking for help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions