angular / router

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

Router navigate with queryparams navigates twice #430

Closed g-cheishvili closed 7 years ago

g-cheishvili commented 7 years ago

this.router.navigate( ['search/flights'], { queryParams: {test: 'test'} } );

redirects to http://localhost:4200/search/flights?test=test and immediately redirects to http://localhost:4200/search/flights, leaving me without queryParams that I need. I left these components empty, with one function, that navigates, no luck, same result, is this any kind of bug or something that I don't understand correctly?

@angular/cli: 1.0.2 node: 7.9.0 os: win32 x64 @angular/animations: 4.1.0 @angular/common: 4.1.0 @angular/compiler: 4.1.0 @angular/core: 4.1.0 @angular/forms: 4.1.0 @angular/http: 4.1.0 @angular/material: 2.0.0-beta.3 @angular/platform-browser: 4.1.0 @angular/platform-browser-dynamic: 4.1.0 @angular/router: 4.1.0 @angular/cli: 1.0.2 @angular/compiler-cli: 4.1.0