aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-04-23 11:18:50 +0100
committerPete Bacon Darwin2013-04-25 19:08:41 +0100
commit77ff1085554675f1a8375642996e5b1e51f9ed2d (patch)
treec7278c8c3136499548e8ea85ca13ee30f5a011cb
parent0fbf584643bc52a11b50f6b1b563cc1b55a268c1 (diff)
downloadangular.js-77ff1085554675f1a8375642996e5b1e51f9ed2d.tar.bz2
fix(location): correctly rewrite Html5 urls
-rw-r--r--src/ng/location.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ng/location.js b/src/ng/location.js
index ce11c2fb..9a5a68ba 100644
--- a/src/ng/location.js
+++ b/src/ng/location.js
@@ -119,13 +119,14 @@ function LocationHtml5Url(appBase, basePrefix) {
};
this.$$rewrite = function(url) {
- var appUrl;
+ var appUrl, prevAppUrl;
if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {
+ prevAppUrl = appUrl;
if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {
return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
} else {
- return appBase;
+ return appBase + prevAppUrl;
}
} else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {
return appBaseNoFile + appUrl;