I am using my company's own UI library to define my left nav items:
export const appNavItems: NavItem[] = [
{
name: 'Request',
route: '/request',
subItems: [
{
name: 'View Requests',
route: '/request/view-request'
},
{
name: 'Create Project',
route: '/request/create-project'
}
]
}
];
So the left nav looks like this (expanded):
If I go to ViewRequest Screen, the left nav does not collapse. But, If I go to Create Project. The Create Project has a Route Guard, and it will execute :
this.router.navigateByUrl('/request/unauthorized');
return false;
After the navigation ( it navigated to unauthorized component) , my left nav bar will collapse.
Is there a way to prevent it to collapse?
Thank you.