mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-09 22:39:39 +08:00
Currently, legacy browsers get to use a clever scheme for resolving relative URIs in html5Mode, and resolve the URI relative to $location.path(). Currently, $location.path() can be '/' under certain circumstances, which means that when we split $location.path() on '/' and later join by '/' after adding another path component, we end up with '//pathComponent'. $$rewrite fails to deal with this correctly, and effectively the $location is never changed from the root path. This CL corrects this by ensuring that the duplicate '/' situation does not occur when resolving relative URIs. Closes #8684