mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2026-03-14 15:08:41 +00:00
First pass on the new control flow syntax migration
This commit is contained in:
@@ -1,41 +1,37 @@
|
||||
<div class="fuse-horizontal-navigation-wrapper">
|
||||
<ng-container *ngFor="let item of navigation; trackBy: trackByFn">
|
||||
@for (item of navigation; track trackByFn($index, item)) {
|
||||
<!-- Skip the hidden items -->
|
||||
<ng-container
|
||||
*ngIf="(item.hidden && !item.hidden(item)) || !item.hidden"
|
||||
>
|
||||
@if ((item.hidden && !item.hidden(item)) || !item.hidden) {
|
||||
<!-- Basic -->
|
||||
<ng-container *ngIf="item.type === 'basic'">
|
||||
@if (item.type === 'basic') {
|
||||
<fuse-horizontal-navigation-basic-item
|
||||
class="fuse-horizontal-navigation-menu-item"
|
||||
[item]="item"
|
||||
[name]="name"
|
||||
></fuse-horizontal-navigation-basic-item>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<!-- Branch: aside, collapsable, group -->
|
||||
<ng-container
|
||||
*ngIf="
|
||||
item.type === 'aside' ||
|
||||
item.type === 'collapsable' ||
|
||||
item.type === 'group'
|
||||
"
|
||||
>
|
||||
@if (
|
||||
item.type === 'aside' ||
|
||||
item.type === 'collapsable' ||
|
||||
item.type === 'group'
|
||||
) {
|
||||
<fuse-horizontal-navigation-branch-item
|
||||
class="fuse-horizontal-navigation-menu-item"
|
||||
[item]="item"
|
||||
[name]="name"
|
||||
></fuse-horizontal-navigation-branch-item>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<!-- Spacer -->
|
||||
<ng-container *ngIf="item.type === 'spacer'">
|
||||
@if (item.type === 'spacer') {
|
||||
<fuse-horizontal-navigation-spacer-item
|
||||
class="fuse-horizontal-navigation-menu-item"
|
||||
[item]="item"
|
||||
[name]="name"
|
||||
></fuse-horizontal-navigation-spacer-item>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user