Angular Material Side Bar with “Half” side mode

前端 未结 3 1875
迷失自我
迷失自我 2021-02-02 14:15

I am working on the dynamic side bar for our project, basically what we want to do is to set up a dynamic side bar when user click on the side bar it will spread when user click

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-02 15:05

    Option 1: Generating Automatically:

    You can create a navigation component from templates provided by Material itself using 'Angular CLI component schematics'

    ng generate @angular/material:nav your-component-name
    

    The above command will generate a new component that includes a toolbar with the app name and a responsive side nav based on Material breakpoints. See more about angular material schematics here


    Option 2: Implementing Manually:

    To implement that, you just have to refer these two links:

    • Resizing Sidenav | Angular Material
    • Navigation List | Angular Material

    glance through the following code. Implementation will be something like this:

    
      
        
    
        
          
            person
            

    Management A

    assignment

    Management B

    domain

    Management C

    folder_shared

    Management X

    You cards and screen Contents goes here.. Will be pushed towards right on expanding side navbar.

提交回复
热议问题