rc2 Router strips extra arguments from the path after matching a route
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
I am trying to implement OAuth2 implicit flow. It redirects to a specified url with a hash appended - #access_token
. This is a problem with HashLocationStrategy because it looks for a matching route.
As a workaround I just defined a route that redirects to the root.
{ path: 'access_token', redirectTo: '/' }
Current behavior In rc2 the router started to strip everything in the URL - for example the value of the access_token.
Expected/desired behavior In rc1 the router didn’t strip anything from the URL and all hashes remained untouched.
Reproduction of the problem If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Angular version: 2.0.0-rc.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: [all | TypeScript X.X | ES6/7 | ES5]
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
@vicb I also think that adding a config parameter to the route config is a valid feature request.
I wonder why you think this is a support request. There isn’t a single question in this issue.