yesod-static-angular-0.1.0: test/angular/mod2-dev.js.expected
(function() {
/* We want to defer bootstrap until all scripts are loaded */
if (!/^NG_DEFER_BOOTSTRAP!/.test(window.name)) {
window.name = "NG_DEFER_BOOTSTRAP!" + window.name;
window.yesod_devel_scripts = {};
window.yesod_devel_check_loaded = function() {
for (var key in window.yesod_devel_scripts) {
if (!window.yesod_devel_scripts[key]) {
/* Not loaded yet */
return;
}
}
/* Everything has loaded, bootstrap can continue */
angular.resumeBootstrap();
};
}
/* Create the module */
angular.module("mod2", ["mod1"]);
/* Figure out the full path of the current script */
var scripts = document.getElementsByTagName("script"),
path = scripts[scripts.length - 1].src;
/* Add a script tag for each file in the module */
var files = ["ctrl.js","factory.js"];
for (var i = 0; i < files.length; i++) {
/* Add the script to the list of scripts to wait for */
window.yesod_devel_scripts["mod2" + "/" + files[i]] = false;
var s = document.createElement("script");
s.type = "application/javascript";
s.src = path + "/" + files[i];
document.body.appendChild(s);
}
})();