1
1
< mat-toolbar class ="mat-elevation-z8 ">
2
- < button mat-icon-button *ngIf =" sidenav.mode === 'over' " (click) =" sidenav.toggle() " >
3
- < mat-icon *ngIf =" !sidenav.opened " >
4
- menu
5
- </ mat-icon >
6
- < mat-icon *ngIf =" sidenav.opened " >
7
- close
8
- </ mat-icon >
9
- </ button >
10
- Responsive side navigation
2
+ < button
3
+ mat-icon-button
4
+ *ngIf =" sidenav.mode === 'over' "
5
+ (click) =" sidenav.toggle() "
6
+ >
7
+ < mat-icon *ngIf =" !sidenav.opened " > menu </ mat-icon >
8
+ < mat-icon *ngIf =" sidenav.opened " > close </ mat-icon >
9
+ </ button >
10
+ Responsive side navigation
11
11
</ mat-toolbar >
12
12
13
13
< mat-sidenav-container >
14
- < mat-sidenav #sidenav ="matSidenav " class ="mat-elevation-z8 ">
15
-
16
- < img class ="avatar mat-elevation-z8 " src ="https://source.unsplash.com/c_GmwfHBDzk/200x200 " />
14
+ < mat-sidenav #sidenav ="matSidenav " class ="mat-elevation-z8 ">
15
+ < img
16
+ class ="avatar mat-elevation-z8 "
17
+ src ="https://source.unsplash.com/c_GmwfHBDzk/200x200 "
18
+ />
17
19
18
- < h4 class ="name "> John Smith</ h4 >
19
- < p class ="designation "> Software Engineer</ p >
20
+ < h4 class ="name "> John Smith</ h4 >
21
+ < p class ="designation "> Software Engineer</ p >
20
22
21
- < mat-divider > </ mat-divider >
23
+ < mat-divider > </ mat-divider >
22
24
23
- < button mat-button class ="menu-button ">
24
- < mat-icon > home</ mat-icon >
25
- < span > Home</ span >
26
- </ button >
27
- < button mat-button class ="menu-button ">
28
- < mat-icon > person</ mat-icon >
29
- < span > Profile</ span >
30
- </ button >
31
- < button mat-button class ="menu-button ">
32
- < mat-icon > info</ mat-icon >
33
- < span > About</ span >
34
- </ button >
35
-
36
- < mat-divider > </ mat-divider >
25
+ < button mat-button class ="menu-button " routerLink ="/home ">
26
+ < mat-icon > home</ mat-icon >
27
+ < span > Home</ span >
28
+ </ button >
29
+ < button mat-button class ="menu-button " routerLink ="/profile ">
30
+ < mat-icon > person</ mat-icon >
31
+ < span > Profile</ span >
32
+ </ button >
33
+ < button mat-button class ="menu-button " routerLink ="/about ">
34
+ < mat-icon > info</ mat-icon >
35
+ < span > About</ span >
36
+ </ button >
37
37
38
- < button mat-button class ="menu-button ">
39
- < mat-icon > help</ mat-icon >
40
- < span > Help</ span >
41
- </ button >
38
+ < mat-divider > </ mat-divider >
42
39
43
- </ mat-sidenav >
44
- < mat-sidenav-content >
45
- < div class ="content mat-elevation-z8 ">
46
- Main content here!
47
- </ div >
48
- </ mat-sidenav-content >
49
- </ mat-sidenav-container >
40
+ < button mat-button class ="menu-button " routerLink ="/help ">
41
+ < mat-icon > help</ mat-icon >
42
+ < span > Help</ span >
43
+ </ button >
44
+ </ mat-sidenav >
45
+ < mat-sidenav-content >
46
+ < div class ="content mat-elevation-z8 ">
47
+ < router-outlet > </ router-outlet >
48
+ </ div >
49
+ </ mat-sidenav-content >
50
+ </ mat-sidenav-container >
0 commit comments