aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/angular.suffix
diff options
context:
space:
mode:
authorMisko Hevery2012-01-06 18:10:47 -0800
committerMisko Hevery2012-01-10 22:27:00 -0800
commit5143e7bf065a3cbdf8400cf095b653d51bc83b8f (patch)
tree980149c365d4cb5586d27975d26366a25ff7be6a /src/scenario/angular.suffix
parentafd25446d23f24872eb20ac79c8fbd2cff203ef0 (diff)
downloadangular.js-5143e7bf065a3cbdf8400cf095b653d51bc83b8f.tar.bz2
feat(module): new module loader
Diffstat (limited to 'src/scenario/angular.suffix')
-rw-r--r--src/scenario/angular.suffix12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/scenario/angular.suffix b/src/scenario/angular.suffix
index a79fd270..c75c5cca 100644
--- a/src/scenario/angular.suffix
+++ b/src/scenario/angular.suffix
@@ -1,7 +1,17 @@
+bindJQuery();
publishExternalAPI(angular);
var $runner = new angular.scenario.Runner(window),
- config = angularJsConfig(document);
+ scripts = document.getElementsByTagName('script'),
+ script = scripts[scripts.length - 1],
+ config = {};
+
+angular.forEach(script.attributes, function(attr) {
+ var match = attr.name.match(/ng[:\-](.*)/);
+ if (match) {
+ config[match[1]] = attr.value || true;
+ }
+});
if (config.autotest) {
jqLiteWrap(document).ready(function() {