Skip to content

Commit 72f2e62

Browse files
committed
fix(sidebar): nav link target doesn't work through appHtmlAttr
1 parent ebc76e1 commit 72f2e62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/coreui/angular/src/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.component.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
<a *ngSwitchCase="'external'"
33
[ngClass]="getLinkClass()"
44
href="{{item.url}}"
5-
[appHtmlAttr]="item.attributes">
5+
[appHtmlAttr]="item.attributes"
6+
[target]="item.attributes.target ? item.attributes.target : '_self'">
67
<i *ngIf="helper.hasIcon(item)" [ngClass]="item | appSidebarNavIcon"></i>
78
<ng-container>{{item.name}}</ng-container>
89
<span *ngIf="helper.hasBadge(item)" [ngClass]="item | appSidebarNavBadge">{{ item.badge.text }}</span>
910
</a>
1011
<a *ngSwitchDefault
1112
[ngClass]="getLinkClass()"
1213
[appHtmlAttr]="item.attributes"
14+
[target]="item.attributes.target ? item.attributes.target : '_self'"
1315
[attr.disabled]="isDisabled()"
1416
routerLinkActive="active"
1517
[routerLink]="[item.url]"

0 commit comments

Comments
 (0)