$routeProvider - optional named group + trailing slash
From $routeProvider documentation:
If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition.
It seems this does not work as expected if there is an optional named group in route path definition (e.g. /page/:name?). In that case an encoded question mark will appear in the URL if you will navigate to /page/index/ (notice the trailing slash at the end).
You can test this issue in this plunkr.
Seems to be the same issue as in https://github.com/angular/angular.js/pull/8200
But I'll keep it open in case the PR gets closed or anything.
This has been fixed in 1.3.x. by #9827. Do we want to backport the fix to 1.2.x ?
@gkalpak I think it makes sense to back-port it to 1.2.x. Would you be up to a PR?
@pkozlowski-opensource: Working on it.
awesome :+1:
Backporting the fix to v1.2.x: #10202 /ping @pkozlowski-opensource
Landed as 1b9e408ddbe48a6d3db27f501515d6efad01f42d, thnx!