-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(theme-basic): implement the visible to nav-items.component.html
- Loading branch information
1 parent
c11aa24
commit 7ea54cd
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
28 changes: 15 additions & 13 deletions
28
npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/nav-items.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<ul class="navbar-nav"> | ||
<li | ||
class="nav-item d-flex align-items-center" | ||
*ngFor="let item of navItems.items$ | async; trackBy: trackByFn" | ||
[abpPermission]="item.requiredPolicy" | ||
> | ||
<ng-container | ||
*ngIf="item.component; else htmlTemplate" | ||
[ngComponentOutlet]="item.component" | ||
></ng-container> | ||
<ng-container *ngFor="let item of navItems.items$ | async; trackBy: trackByFn"> | ||
<li | ||
class="nav-item d-flex align-items-center" | ||
*ngIf="item.visible()" | ||
[abpPermission]="item.requiredPolicy" | ||
> | ||
<ng-container | ||
*ngIf="item.component; else htmlTemplate" | ||
[ngComponentOutlet]="item.component" | ||
></ng-container> | ||
|
||
<ng-template #htmlTemplate> | ||
<div [innerHTML]="item.html" (click)="item.action ? item.action() : null"></div> | ||
</ng-template> | ||
</li> | ||
<ng-template #htmlTemplate> | ||
<div [innerHTML]="item.html" (click)="item.action ? item.action() : null"></div> | ||
</ng-template> | ||
</li> | ||
</ng-container> | ||
</ul> |