mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-22 13:21:51 +00:00
Pass the toKeyValue() test - parsing flags
This commit is contained in:
parent
46c6406b25
commit
b08e2be64c
1 changed files with 2 additions and 2 deletions
|
|
@ -398,8 +398,8 @@ function parseKeyValue(/**string*/keyValue) {
|
||||||
|
|
||||||
function toKeyValue(obj) {
|
function toKeyValue(obj) {
|
||||||
var parts = [];
|
var parts = [];
|
||||||
foreach(obj, function(value, key){
|
foreach(obj, function(value, key) {
|
||||||
parts.push(escape(key) + '=' + escape(value));
|
parts.push(escape(key) + (value === true ? '' : '=' + escape(value)));
|
||||||
});
|
});
|
||||||
return parts.length ? parts.join('&') : '';
|
return parts.length ? parts.join('&') : '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue