yesod-static-angular-0.1.2: test/angular/ang3-mod1-and-templ-dev.js.expected
(function() {
if (angular.isUndefined(window.yesod_devel_scripts)) {
window.yesod_devel_scripts = {};
}
/* 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_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("mod1", []);
/* Figure out the full path of the current script */
var scripts = document.getElementsByTagName("script"), path;
for (var i=0; i<scripts.length; i++) {
if (scripts[i].src.indexOf("module1.js")>=0) {
path = scripts[i].src;
break;
}
}
/* Add a script tag for each file in the module */
var files = ["a.js","b.js","c.js","my-pane.js","my-tabs.js","my-pane.hamlet","my-tabs.hamlet"];
for (var i = 0; i < files.length; i++) {
/* Add the script to the list of scripts to wait for */
window.yesod_devel_scripts["mod1" + "/" + files[i]] = false;
var s = document.createElement("script");
s.type = "application/javascript";
s.src = path + "/" + files[i];
document.body.appendChild(s);
}
})();