From 8f4f7886d57a4d858f9038900c842c04d61a93e3 Mon Sep 17 00:00:00 2001 From: sercan Date: Sun, 20 Jun 2021 21:59:24 +0300 Subject: [PATCH] (fuse/navigation) Moved *ngIf directives into their own "ng-container" containers --- .../components/basic/basic.component.html | 165 ++++++++--------- .../components/branch/branch.component.html | 125 ++++++------- .../components/branch/branch.component.ts | 11 ++ .../horizontal/horizontal.component.html | 35 ++-- .../components/aside/aside.component.html | 88 +++++----- .../components/basic/basic.component.html | 166 +++++++++--------- .../collapsable/collapsable.component.html | 88 +++++----- .../components/group/group.component.html | 88 +++++----- .../vertical/vertical.component.html | 112 ++++++------ 9 files changed, 469 insertions(+), 409 deletions(-) diff --git a/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html b/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html index 70a1bbd4..48aab97d 100644 --- a/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html +++ b/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html @@ -5,77 +5,83 @@ [ngClass]="item.classes?.wrapper"> -
- -
+ +
+ +
+
- - - + + + + + -
- -
+ +
+ +
+
-
- -
+ +
+ +
+
- - - + + + + + -
- -
+ +
+ +
+
-
- -
+ +
+ +
+
@@ -83,11 +89,12 @@ - + + +
@@ -96,24 +103,24 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+ diff --git a/src/@fuse/components/navigation/horizontal/components/branch/branch.component.html b/src/@fuse/components/navigation/horizontal/components/branch/branch.component.html index 7b9af9a1..87aafa1e 100644 --- a/src/@fuse/components/navigation/horizontal/components/branch/branch.component.html +++ b/src/@fuse/components/navigation/horizontal/components/branch/branch.component.html @@ -1,59 +1,63 @@ -
+
- -
+ [matMenuTriggerFor]="matMenu" + (onMenuOpen)="triggerChangeDetection()" + (onMenuClose)="triggerChangeDetection()" + #trigger="matMenuTrigger"> + +
+ - + -
- -
+ +
+ +
+
-
- - -
+ +
+ + +
+
-
- -
+ +
+ +
+
@@ -78,11 +82,12 @@ [matTooltip]="item.tooltip || ''"> - + + +
@@ -91,25 +96,25 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+
diff --git a/src/@fuse/components/navigation/horizontal/components/branch/branch.component.ts b/src/@fuse/components/navigation/horizontal/components/branch/branch.component.ts index 2abf7cc5..53ef2a90 100644 --- a/src/@fuse/components/navigation/horizontal/components/branch/branch.component.ts +++ b/src/@fuse/components/navigation/horizontal/components/branch/branch.component.ts @@ -81,4 +81,15 @@ export class FuseHorizontalNavigationBranchItemComponent implements OnInit, OnDe // Mark for check this._changeDetectorRef.markForCheck(); } + + /** + * Track by function for ngFor loops + * + * @param index + * @param item + */ + trackByFn(index: number, item: any): any + { + return item.id || index; + } } diff --git a/src/@fuse/components/navigation/horizontal/horizontal.component.html b/src/@fuse/components/navigation/horizontal/horizontal.component.html index 6e5a326d..7db23d99 100644 --- a/src/@fuse/components/navigation/horizontal/horizontal.component.html +++ b/src/@fuse/components/navigation/horizontal/horizontal.component.html @@ -1,30 +1,33 @@
- + - + + + - + + + - + + + diff --git a/src/@fuse/components/navigation/vertical/components/aside/aside.component.html b/src/@fuse/components/navigation/vertical/components/aside/aside.component.html index 3440a7e5..469d7b61 100644 --- a/src/@fuse/components/navigation/vertical/components/aside/aside.component.html +++ b/src/@fuse/components/navigation/vertical/components/aside/aside.component.html @@ -11,11 +11,12 @@ [matTooltip]="item.tooltip || ''"> - + + +
@@ -24,25 +25,25 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+
@@ -58,35 +59,40 @@ - + + + - + + + - + + + - + + + - + + + diff --git a/src/@fuse/components/navigation/vertical/components/basic/basic.component.html b/src/@fuse/components/navigation/vertical/components/basic/basic.component.html index 7ef1799b..a9a9dd98 100644 --- a/src/@fuse/components/navigation/vertical/components/basic/basic.component.html +++ b/src/@fuse/components/navigation/vertical/components/basic/basic.component.html @@ -5,77 +5,84 @@ [ngClass]="item.classes?.wrapper"> - - - + + + + + - - - + + + + + -
- -
+ +
+ +
+
- - - + + + + + - - - + + + + + -
- -
+ +
+ +
+
-
- -
+ +
+ +
+
@@ -83,11 +90,12 @@ - + + +
@@ -96,24 +104,24 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+ diff --git a/src/@fuse/components/navigation/vertical/components/collapsable/collapsable.component.html b/src/@fuse/components/navigation/vertical/components/collapsable/collapsable.component.html index a24a299e..770efdb3 100644 --- a/src/@fuse/components/navigation/vertical/components/collapsable/collapsable.component.html +++ b/src/@fuse/components/navigation/vertical/components/collapsable/collapsable.component.html @@ -10,11 +10,12 @@ (click)="toggleCollapsable()"> - + + +
@@ -23,25 +24,25 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+ - + + + - + + + - + + + - + + + - + + + diff --git a/src/@fuse/components/navigation/vertical/components/group/group.component.html b/src/@fuse/components/navigation/vertical/components/group/group.component.html index 1322ddb7..49218739 100644 --- a/src/@fuse/components/navigation/vertical/components/group/group.component.html +++ b/src/@fuse/components/navigation/vertical/components/group/group.component.html @@ -7,11 +7,12 @@
- + + +
@@ -20,25 +21,25 @@ {{item.title}}
-
- - {{item.subtitle}} - -
+ +
+ + {{item.subtitle}} + +
+
-
-
- {{item.badge.title}} + +
+
+ {{item.badge.title}} +
-
+
@@ -50,35 +51,40 @@ - + + + - + + + - + + + - + + + - + + + diff --git a/src/@fuse/components/navigation/vertical/vertical.component.html b/src/@fuse/components/navigation/vertical/vertical.component.html index 79def1f9..ef0186e3 100644 --- a/src/@fuse/components/navigation/vertical/vertical.component.html +++ b/src/@fuse/components/navigation/vertical/vertical.component.html @@ -24,46 +24,52 @@ - + + + - + + + - + + + - + + + - + + + - + + + @@ -84,31 +90,33 @@
-
+ +
- - + + - - + + - - + + + + + + - - -
+
+