Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 77ff108

Browse files
fix(location): correctly rewrite Html5 urls
1 parent 0fbf584 commit 77ff108

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/location.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ function LocationHtml5Url(appBase, basePrefix) {
119119
};
120120

121121
this.$$rewrite = function(url) {
122-
var appUrl;
122+
var appUrl, prevAppUrl;
123123

124124
if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {
125+
prevAppUrl = appUrl;
125126
if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {
126127
return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
127128
} else {
128-
return appBase;
129+
return appBase + prevAppUrl;
129130
}
130131
} else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {
131132
return appBaseNoFile + appUrl;

0 commit comments

Comments
 (0)