angular.js/src/scenario/angular.suffix

23 lines
513 B
Text
Raw Normal View History

2012-01-07 02:10:47 +00:00
bindJQuery();
publishExternalAPI(angular);
var $runner = new angular.scenario.Runner(window),
2012-01-07 02:10:47 +00:00
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() {
angular.scenario.setUpAndRun(config);
});
}
})(window, document);