File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1
1
< ng-container [ngSwitch] ="linkType ">
2
+ < a *ngSwitchCase ="'disabled' "
3
+ [ngClass] ="getLinkClass() "
4
+ [appHtmlAttr] ="item.attributes "
5
+ >
6
+ < i *ngIf ="helper.hasIcon(item) " [ngClass] ="item | appSidebarNavIcon "> </ i >
7
+ < ng-container > {{item.name}}</ ng-container >
8
+ < span *ngIf ="helper.hasBadge(item) " [ngClass] ="item | appSidebarNavBadge "> {{ item.badge.text }}</ span >
9
+ </ a >
2
10
< a *ngSwitchCase ="'external' "
3
- [ngClass] ="getLinkClass() "
4
- href ="{{item.url}} "
5
- [appHtmlAttr] ="item.attributes ">
11
+ [ngClass] ="getLinkClass() "
12
+ [href] ="item.url "
13
+ [appHtmlAttr] ="item.attributes "
14
+ >
6
15
< i *ngIf ="helper.hasIcon(item) " [ngClass] ="item | appSidebarNavIcon "> </ i >
7
16
< ng-container > {{item.name}}</ ng-container >
8
17
< span *ngIf ="helper.hasBadge(item) " [ngClass] ="item | appSidebarNavBadge "> {{ item.badge.text }}</ span >
14
23
[attr.disabled] ="isDisabled() "
15
24
routerLinkActive ="active "
16
25
[routerLink] ="item.url "
17
- (click) ="hideMobile() ">
26
+ (click) ="hideMobile() "
27
+ >
18
28
< i *ngIf ="helper.hasIcon(item) " [ngClass] ="item | appSidebarNavIcon "> </ i >
19
29
< ng-container > {{item.name}}</ ng-container >
20
30
< span *ngIf ="helper.hasBadge(item) " [ngClass] ="item | appSidebarNavBadge "> {{ item.badge.text }}</ span >
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export class AppSidebarNavLinkComponent implements OnInit {
37
37
}
38
38
39
39
public getLinkType ( ) {
40
- return this . isExternalLink ( ) ? 'external' : 'link' ;
40
+ return this . isDisabled ( ) ? 'disabled' : this . isExternalLink ( ) ? 'external' : 'link' ;
41
41
}
42
42
43
43
public hasVariant ( ) {
You can’t perform that action at this time.
0 commit comments