File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 13
13
< span > {{menuItem.name}}</ span >
14
14
</ a >
15
15
<!-- Has child menu items (so, this is a parent menu) -->
16
- < a href ="javascript:void(0); " class =" menu-toggle " *ngIf =" menuItem.items ">
16
+ < a href ="javascript:void(0); " [ngClass] =" {' menu-toggle': menuItem.items.length} ">
17
17
< i *ngIf ="menuItem.icon " class ="material-icons "> {{menuItem.icon}}</ i >
18
18
< span > {{menuItem.name}}</ span >
19
19
</ a >
31
31
< span > {{subMenuItem.name}}</ span >
32
32
</ a >
33
33
<!-- Has child menu items (so, this is a parent menu) -->
34
- < a href ="javascript:void(0); " class =" menu-toggle " *ngIf =" subMenuItem.items ">
34
+ < a href ="javascript:void(0); " [ngClass] =" {' menu-toggle': subMenuItem.items.length} ">
35
35
< i *ngIf ="subMenuItem.icon " class ="material-icons "> {{subMenuItem.icon}}</ i >
36
36
< span > {{subMenuItem.name}}</ span >
37
37
</ a >
57
57
</ li >
58
58
</ ng-template >
59
59
</ ul >
60
- </ div >
60
+ </ div >
Original file line number Diff line number Diff line change 1
- export class MenuItem {
1
+ export class MenuItem {
2
2
name : string = '' ;
3
3
permissionName : string = '' ;
4
4
icon : string = '' ;
10
10
this . permissionName = permissionName ;
11
11
this . icon = icon ;
12
12
this . route = route ;
13
- this . items = childItems ;
13
+
14
+ if ( childItems ) {
15
+ this . items = childItems ;
16
+ } else {
17
+ this . items = [ ] ;
18
+ }
14
19
}
15
- }
20
+ }
You can’t perform that action at this time.
0 commit comments