aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 5b5aa87b..4e3266eb 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -398,6 +398,14 @@ function parseKeyValue(keyValue) {
return obj;
}
+function toKeyValue(obj) {
+ var parts = [];
+ foreach(obj, function(value, key){
+ parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
+ });
+ return parts.length ? parts.join('&') : '';
+};
+
function angularInit(config){
if (config.autobind) {
compile(window.document, config).$init();