@@ -39,7 +39,7 @@ function parseAppUrl(relativeUrl, locationObj, appBase) {
39
39
var match = urlResolve ( relativeUrl , appBase ) ;
40
40
locationObj . $$path = decodeURIComponent ( prefixed && match . pathname . charAt ( 0 ) === '/' ?
41
41
match . pathname . substring ( 1 ) : match . pathname ) ;
42
- locationObj . $$search = parseKeyValue ( match . search ) ;
42
+ locationObj . $$search = parseKeyValue ( match . search , locationObj . $$queryDelimiter ) ;
43
43
locationObj . $$hash = decodeURIComponent ( match . hash ) ;
44
44
45
45
// make sure path starts with '/';
@@ -90,6 +90,7 @@ function serverBase(url) {
90
90
function LocationHtml5Url ( appBase , basePrefix , queryDelimiter ) {
91
91
this . $$html5 = true ;
92
92
basePrefix = basePrefix || '' ;
93
+ this . $$queryDelimiter = queryDelimiter ;
93
94
var appBaseNoFile = stripFile ( appBase ) ;
94
95
parseAbsoluteUrl ( appBase , this , appBase ) ;
95
96
@@ -120,7 +121,7 @@ function LocationHtml5Url(appBase, basePrefix, queryDelimiter) {
120
121
* @private
121
122
*/
122
123
this . $$compose = function ( ) {
123
- var search = toKeyValue ( this . $$search , queryDelimiter ) ,
124
+ var search = toKeyValue ( this . $$search , this . $$ queryDelimiter) ,
124
125
hash = this . $$hash ? '#' + encodeUriSegment ( this . $$hash ) : '' ;
125
126
126
127
this . $$url = encodePath ( this . $$path ) + ( search ? '?' + search : '' ) + hash ;
@@ -157,6 +158,7 @@ function LocationHtml5Url(appBase, basePrefix, queryDelimiter) {
157
158
*/
158
159
function LocationHashbangUrl ( appBase , hashPrefix , queryDelimiter ) {
159
160
var appBaseNoFile = stripFile ( appBase ) ;
161
+ this . $$queryDelimiter = queryDelimiter ;
160
162
161
163
parseAbsoluteUrl ( appBase , this , appBase ) ;
162
164
@@ -227,7 +229,7 @@ function LocationHashbangUrl(appBase, hashPrefix, queryDelimiter) {
227
229
* @private
228
230
*/
229
231
this . $$compose = function ( ) {
230
- var search = toKeyValue ( this . $$search , queryDelimiter ) ,
232
+ var search = toKeyValue ( this . $$search , this . $$ queryDelimiter) ,
231
233
hash = this . $$hash ? '#' + encodeUriSegment ( this . $$hash ) : '' ;
232
234
233
235
this . $$url = encodePath ( this . $$path ) + ( search ? '?' + search : '' ) + hash ;
@@ -287,6 +289,12 @@ LocationHashbangInHtml5Url.prototype =
287
289
*/
288
290
$$replace : false ,
289
291
292
+ /**
293
+ * Allows using ";" instead of "&" to separate query string arguments
294
+ * @private
295
+ */
296
+ $$queryDelimiter : '&' ,
297
+
290
298
/**
291
299
* @ngdoc method
292
300
* @name $location#absUrl
@@ -415,7 +423,7 @@ LocationHashbangInHtml5Url.prototype =
415
423
return this . $$search ;
416
424
case 1 :
417
425
if ( isString ( search ) ) {
418
- this . $$search = parseKeyValue ( search ) ;
426
+ this . $$search = parseKeyValue ( search , this . $$queryDelimiter ) ;
419
427
} else if ( isObject ( search ) ) {
420
428
this . $$search = search ;
421
429
} else {
0 commit comments