After defining my angular module in a routine following window.onload, I've noticed that angular seems to look for the module before the window is fully loaded. However, I want to make sure all assets are loaded before triggering the angular module.
Is there a way to hook into another load event like DOM ready in order to ensure my application starts up before the angular module? Keep in mind that my angular module is being used by another library as a dependency.
window.onload = function() {
angular.module("nav", [])
.controller("NavController", function() {
});
}
<nav class="state_2" ng-app="nav">
<ul ng-controller="NavController">
<li></li>
<li></li>
<li></li>
</ul>
</nav>