I am using ngrx/router.
I have 4 pages. And two of them /admin/dashboard
and /admin/management
need admin access.
/home
/products
/admin/dashboard
/admin/management
I can click User and Admin to switch between user or admin views.
<li linkActive="active">
<a linkTo="/home">User</a>
</li>
<li linkActive="active">
<a linkTo="/admin/dashboard">Admin</a>
</li>
When I in /home
and /products
, I want User be active. Now only when in /home
, it is active.
Similar, when I in /admin/dashboard
and /admin/management
, I want Admin be active. Now only when in /admin/dashboard
, it is active.
How can I do that? Thanks