At the bottom of my HTML is the following:
<script defer="defer" src="http://localhost:8080/bower_components/jquery/dist/jquery.min.js"></script>
<script defer="defer" src="http://localhost:8080/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script defer="defer" src="http://localhost:8080/apps/promotion/active.js">
</script>
</body>
</html>
In random moments, I will get this error while refreshing the page:
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=activePromos&p1=Err…20(http%3A%2F%2Flocalhost%3A8080%2Fapps%2Fpromotion%2Factive.js%3A1%3A7124)
Sometimes this happens for several updates per line, and sometimes it will work for several updates per line. However, there are times when I get an error and it is annoying.
I found the following: If I delete the scripts jqueryand bootstrap, so that I only have one script(active.js) with the attribute defer, it always works. I am trying to load scripts after loading a page in the specified order.
- (requirejs?)? , defer , , AngularJS. JS , 1 2 CSS.