2

hello i am trying to add some string parameters to the navigation url like this this.router.navigate(['/merchant/setpassword?acc='+response.infoCode]);
but when i am using this is redirecting me to

/merchant/setpassword%3Facc%3DeyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJtZXppYW4iLCJjb3VudHJ5IjoiOTYiLCJjcmVhdGVkIjoxNTAwMzExODk2MDQ5LC

My problem lies in %3Facc%D i want this to become ?acc=

Ala'a Mezian
  • 297
  • 1
  • 6
  • 15

1 Answers1

3

Try this,

this.router.navigate( [
  'url', { id: 'companyId', param1: 'value1'
}]);

Check, How to handle query parameters in angular 2

Imran
  • 1,732
  • 3
  • 21
  • 46