diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index 72ff26b0..5b5aa87b 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -45,7 +45,7 @@ UrlWatcher.prototype = { } }; - +//////////////////////////////////// if (typeof document.getAttribute == 'undefined') document.getAttribute = function() {}; @@ -386,3 +386,20 @@ function compile(element, config) { } ///////////////////////////////////////////////// +function parseKeyValue(keyValue) { + var obj = {}, key_value, key; + foreach((keyValue || "").split('&'), function(keyValue){ + if (keyValue) { + key_value = keyValue.split('='); + key = decodeURIComponent(key_value[0]); + obj[key] = key_value[1] ? decodeURIComponent(key_value[1]) : true; + } + }); + return obj; +} + +function angularInit(config){ + if (config.autobind) { + compile(window.document, config).$init(); + } +} |
