You could do query parameters instead of route parameters. Angular.io
Documentation for Query
Parameters:
https://angular.io/docs/ts/latest/guide/router.html#!#query-parameters
Then you could have:
{path: 'dashboard', component: DashboardComponent}
And then have the DashboardComponent check for parameters
On Tuesday, October 25, 2016 at 7:40:43 AM UTC-6, [email protected]
wrote:
>
> Hi,
>
> I would like to do it in a correct way that case, I would like to get
> multiple id from the url.
>
> I have that code, but I don't like it.
>
> *{path: 'dashboard/:id', component: DashboardComponent},*
> *{path: 'dashboard/:id/:id2', component: DashboardComponent},*
> *{path: 'dashboard/:id/:id2/:id3', component: DashboardComponent},*
> *{path: 'dashboard/:id/:id2/:id3/:id4', component: DashboardComponent},*
>
> Any idea about how I can do it in the correct way?
>
> Thanks,
>
> Rafa
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.