From 77ff1085554675f1a8375642996e5b1e51f9ed2d Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 23 Apr 2013 11:18:50 +0100 Subject: [PATCH] fix(location): correctly rewrite Html5 urls --- src/ng/location.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ng/location.js b/src/ng/location.js index ce11c2fbb06e..9a5a68ba35d3 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;