bug fixed
This commit is contained in:
parent
a3f6c4a588
commit
1ff59c5f54
|
@ -12,7 +12,7 @@ import { LogService } from '@ucap/ng-logger';
|
||||||
|
|
||||||
import { AppSelector } from '@app/store/state';
|
import { AppSelector } from '@app/store/state';
|
||||||
|
|
||||||
const NAVS = ['group/', 'chat/', 'organization/', 'message/'];
|
const NAVS = ['group', 'chat', 'organization', 'message'];
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layouts-default',
|
selector: 'app-layouts-default',
|
||||||
|
@ -48,6 +48,8 @@ export class DefaultLayoutComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.setTabGroup(this.router.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
@ -70,4 +72,10 @@ export class DefaultLayoutComponent implements OnInit, OnDestroy {
|
||||||
this.leftSidenav.open();
|
this.leftSidenav.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private setTabGroup(url: string) {
|
||||||
|
this.navTabGroup.selectedIndex = NAVS.findIndex((v) =>
|
||||||
|
url.startsWith(`/${v}`)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user