I've got a hyper link that I need to make a routerlink in Angular 4. I have a lot of parts to the url, part of which is an array. I'm not sure how to make the array split itself into parts for the routerlink array.
Take this contrived example:
[routerLink]="['/customers', customerid, orderid, arrayofints, anotherint]"
I'd like the router to look like this where customerid = 10, order = 500, arrayofints = [1,2,3], anotherint = 888
"/customers/10/500/1/2/3/888"
I end up with something like this instead:
"/customers/10/500;0=1;1=2;2=3/888"
orderid, ...arrayofints, anotherint
? Ah, no:Parser Error: Unexpected token . at column
– Paten[routerLink]="createRouteWith(thing)"
. My point is that you aren't so limited in what syntax you can use within the component code. – Paten[routerLink]="[].concat.apply([],['/customers', customerid, orderid, arrayofints, anotherint])"
– Jampacked