Skip to content

Commit

Permalink
feat(theme-basic): implement the visible to nav-items.component.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-erim committed Jul 20, 2020
1 parent c11aa24 commit 7ea54cd
Showing 1 changed file with 15 additions and 13 deletions.
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>

0 comments on commit 7ea54cd

Please sign in to comment.