diff options
| author | Misko Hevery | 2012-06-12 13:33:57 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-06-13 10:49:05 -0700 | 
| commit | 0f44964e5e0f7e37d7fa3216bb10fd61fbf52ae2 (patch) | |
| tree | 55477f9c951816499fffa093f05ae09d0849f5fe /src/ng/location.js | |
| parent | f6b09b913968d578010ca757e9d0d9ceed67027a (diff) | |
| download | angular.js-0f44964e5e0f7e37d7fa3216bb10fd61fbf52ae2.tar.bz2 | |
fix($location): correctly parse link urls in hashbang mode with prefix
This is a second fix for a regression that was introduced by 92a2e180.
The fix addresses scenarios when the $location service is configured with
a hash prefix.
Closes #1037
Diffstat (limited to 'src/ng/location.js')
| -rw-r--r-- | src/ng/location.js | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/ng/location.js b/src/ng/location.js index 7576015c..b5f10293 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -525,7 +525,7 @@ function $LocationProvider(){        // update location with href without the prefix        href = absHref.substr(absUrlPrefix.length); -      if (href.charAt(0) == '#') href = href.substr(1); +      if (href.indexOf('#' + hashPrefix) == 0) href = href.substr(hashPrefix.length + 1);        $location.url(href);        $rootScope.$apply();        event.preventDefault(); | 
