bugfix
This commit is contained in:
parent
d07159dfde
commit
3d0a24e610
2 changed files with 12 additions and 1 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
class="nav-links"
|
class="nav-links"
|
||||||
routerLink="add-task"
|
routerLink="add-task"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
active: currentPath == 'add-task'
|
active: isAddTask()
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,17 @@ export class SidebarMobileComponent {
|
||||||
this.getCurrentPath();
|
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() {
|
getCurrentPath() {
|
||||||
this.router.events.subscribe((event) => {
|
this.router.events.subscribe((event) => {
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue