diff options
Diffstat (limited to 'src/angular-bootstrap.js')
| -rw-r--r-- | src/angular-bootstrap.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/angular-bootstrap.js b/src/angular-bootstrap.js index fb2acbeb..f6a7c5aa 100644 --- a/src/angular-bootstrap.js +++ b/src/angular-bootstrap.js @@ -5,14 +5,22 @@ * (c) 2010-2011 AngularJS http://angularjs.org * License: MIT */ -(function(window) { +(function(window, document) { var filename = /^(.*\/)angular-bootstrap.js(#.*)?$/, scripts = document.getElementsByTagName("SCRIPT"), + autobind = scripts[scripts.length-1].getAttribute('ng:autobind'), + config, serverPath, match, globalVars = {}; + if (autobind) { + config = {autobind: autobind}; + } else { + config = (autobind == '') ? {autobind: true} : {} + } + for(var j = 0; j < scripts.length; j++) { match = (scripts[j].src || "").match(filename); if (match) { @@ -99,7 +107,7 @@ // empty the cache to prevent mem leaks globalVars = {}; - angularInit({autobind:true}, document); + angularInit(config, document); } if (window.addEventListener) { @@ -108,5 +116,5 @@ window.attachEvent('onload', onLoadListener); } -})(window); +})(window, document); |
