ngRoute should support route params containing urlencoded slashes #10479
Description
Request Type: feature
How to reproduce: http://plnkr.co/edit/cHsrkTifPonHRaCWSp7q?p=preview
Component(s): ngRoute
Impact: small
Complexity:
This issue is related to:
Detailed Description:
It seems that ngRoute
does not support route params containing urlencoded slashes(%2F
).
I'm working on an api mock service whose data is organized by paths(e.g. /repos/:owner/:repo/issues
). The dashboard app for this service is built on Angular. The url for api /repos/:owner/:repo/issues
was expected to be https://myservice.doamin/#/apis/%2Frepos%2F%3Aowner%2F%3Arepo%2Fissues
and will be routed to /apis/:api
. However ngRoute decoded the hash and replaced it with #/apis//repos/:owner/:repo/issues
, which will be misrouted.
The plnkr above shows a simplified situation.
I searched through docs, stackoverflow and github issues, only finding one possible way to get around this problem by encoding the path twice and decode the $routeParams
in controllers. That's unnatural.
Params containing urlencoded slashes are reasonable and should be supported(, rather than be rounded). So is there a possible way to do it, or am i missing something?
Other Comments: