Skip to content

Commit 97c4b7d

Browse files
committed
fix Sidebar toggeling
1 parent 95cbc34 commit 97c4b7d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<ul class="nav-links">
3131
<li>
3232
<button mat-button *ngFor="let item of navList" [class.active]="item.path === isActivePath"
33-
[routerLink]="item.path"> <!-- class="badge" data-badge="2" -->
33+
[routerLink]="item.path" (click)="closeSidebar()"> <!-- class="badge" data-badge="2" -->
3434
<span class="material-icons">
3535
{{item.data?.sidenavIcon}}
3636
</span>

projects/ng-mat-components/src/fs-nav-frame/fs-nav-frame.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ export class FsNavFrameComponent implements OnInit {
6363
this.isClosed = !this.isClosed;
6464
}
6565

66+
closeSidebar() {
67+
if (!this.isClosed) {
68+
this.toggleSidemenu()
69+
}
70+
}
71+
6672
isNavActive(name: string): boolean {
6773
return name === this.isActivePath;
6874
}

0 commit comments

Comments
 (0)