mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +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) {
|
||||
var parts = [];
|
||||
foreach(obj, function(value, key){
|
||||
parts.push(escape(key) + '=' + escape(value));
|
||||
foreach(obj, function(value, key) {
|
||||
parts.push(escape(key) + (value === true ? '' : '=' + escape(value)));
|
||||
});
|
||||
return parts.length ? parts.join('&') : '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue