Angular - unable to navigate to a component with a parameter

After a successful login I’m trying to reroute the user to another component with a value but in my case it keeps going to the page not found component. my route isn’t recognizing the value passed through the navigate so what am I doing wrong?


This code does not work. unable to pass value with the route:
this._router.navigate(['userDashboard/testvalue', testvalue]);   

This code works:     
this._router.navigate(['/userDashboard']); **// works**


const userDashboardRouters: Routes = [
     { path: 'userDashboard', 
            { path: '', component: UserDashboardComponent },
            { path: ':testvalue', component: UserDashboardQueueListingComponent },

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.