Creating a component named Dashboard
for admin requires passing the username in the route to find user information.
This is the routing setup:
{path:'dashboard/:username',component:DashboardComponent,children:[
{path:'role',component:RoleComponent},
When accessing the URL:
localhost:4200/panel/dashboard/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="365d5f57765d5f571855595b">[email protected]</a>
The Dashborad
Component includes a menu for users.
To visit the Role
Component, the correct URL should be:
localhost:4200/panel/dashboard/role
But it seems to have trouble navigating to the Role
Component. However, when using this route:
{path:'dashboard',component:DashboardComponent,children:[
it functions properly.
How can multiple routes be set up for the Dashboard
component?
What could be causing the issue and how can it be resolved?