on first load, angular is undefined, when i refresh the page second time it works fine, not sure it might be JS Lining, pleas have a look : http://www.alhayygroup.com/#/
requirejs([
"js/jquery-1.11.3.min",
"js/angular.min",
"js/bootstrap.min",
"js/ui-bootstrap-tpls.min.js",
"js/angular-sanitize.min.js",
"js/appSite.js",
"js/angular-route.js",
"js/appSiteCtrl.js",
"js/jquery.validate.min.js",
"js/angular-validate.js",
"js/mobile_navigation.js"
], function(util) {
//This function is called when all the js files is loaded.
//If js calls define(), then this function is not fired until
//js dependencies have loaded, and the util argument will hold
//the module value for "helper/util".
});
Thanks!!
这是因为requirejs加载JS异步的,如果我们的任何的js
这是依赖于angularjs.min
前负荷angularjs.min
那么你会得到了这个问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.