angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Query Strings in combination with angular universal / disabled JS #397

Open zanettin opened 8 years ago

zanettin commented 8 years ago

When I click on a routerLink

LINK:
<a [routerLink]=" ['./RouteParamsTest', { userId : '1919', lang : 'it', token : 'jwt' }] ">Route Params Test 2</a>

CONFIG:
{ path: '/route-params-test/:userId/:lang', component: RouteParamsTest, name: 'RouteParamsTest' }

with disabled JS, this URL gets called => http://localhost:3000/route-params-test/1919/it and the query string won't appear. With activated JS everything works as expected.

tested with angular-universal-preview 0.52.0 => https://github.com/angular/universal-starter

zanettin commented 8 years ago

Seams to be an issue of angular universal => https://github.com/angular/universal/issues/275

zanettin commented 8 years ago

as @alexpods said, there's a issue in the core router while using query string params in combination with angular universal. explanation and code references can be found here =>https://github.com/angular/universal/issues/275

ganeshkbhat commented 8 years ago

The query string seems to be working with the parent where query string shows up correctly without issues. But when it is child route then instead of ? the query string shows up as ; with or without route params. The query strings are identified and assignable. http://stackoverflow.com/questions/35691663/child-url-query-params-shown-with-instead-of/35698213