This commit is contained in:
Chneemann 2024-04-26 13:12:08 +02:00
parent d07159dfde
commit 3d0a24e610
2 changed files with 12 additions and 1 deletions

View file

@ -27,7 +27,7 @@
class="nav-links"
routerLink="add-task"
[ngClass]="{
active: currentPath == 'add-task'
active: isAddTask()
}"
>
<img

View file

@ -18,6 +18,17 @@ export class SidebarMobileComponent {
this.getCurrentPath();
}
isAddTask(): boolean {
return (
this.currentPath === 'add-task' ||
this.currentPath === 'add-task/none' ||
this.currentPath === 'add-task/todo' ||
this.currentPath === 'add-task/inprogress' ||
this.currentPath === 'add-task/awaitfeedback' ||
this.currentPath === 'add-task/done'
);
}
getCurrentPath() {
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {