Used the yeoman angular generator to scaffold out a fresh ng1 app. Had the following basic code for my main module. Notice that I am using ui-router for my routing system.
'use strict';
angular
.module('myApp', [
'ngMessages',
'ngResource',
'ngSanitize',
'ui.router'
])
.config([ '$stateProvider', '$urlRouterProvider', function( $stateProvider, $urlRouterProvider ) {
console.log('config');
$stateProvider
.state({
name: 'main',
url: '/',
templateUrl: 'views/main.html',
controller: 'MainCtrl'
});
$urlRouterProvider.otherwise('/');
}])
.run([ function() {
console.log('run');
}]);
I triple checked that all the necessary files were referenced properly. My angular application only initializes half of the time when I refresh the page. No errors are logged to the console, my state won't load, and none of the console.log
statements show up either.