I am fairly new to Angular 2 and do not know the correct terms to search for in order to get what i need.
I am using Angular 2 RC5 and the RouterModule in my app. When I pass params for a route to navigate to, Angular 2 Router automatically URL encodes it. Now although thats a good thing but is there a way to prevent it for certain params?
For example, I want to add comma separated values in the URL:
http://localhost:4200/appcomponent/?data=abc1,abc2,abc3
What angular 2 makes it:
http://localhost:4200/appcomponent/;data=abc1%2Cabc2%2Cabc3
(which looks rather messy)
Any suggestions how to make it more readable in URL?
Thanks!
You could navigate by Url instead:
router.navigateByUrl('/parent/11/(simple//right:user/victor)');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With