I have a simple app.js
that is supposed to load a controller. The controller isn't being loaded though. Would appreciate some help.
Here is my app.js
:
/* globals APP, angular */
angular.module('templates-outlook', []);
angular.module(APP, [
'templates-outlook',
'ui.router'
])
.config[(
'$stateProvider',
function ($stateProvider) {
console.log("Loaded app.js");
$stateProvider
.state('outlook', {
url: '/extension',
templateUrl: 'templates/outlook/outlook_main.html',
controller: 'OutlookMainController'
})
}
])
Here is outlookmain.js . It's really simple.
/* global angular, APP */
angular.module(APP).controller('OutlookMainController', [
console.log('lion king'),
function () {
console.log('blah blah');
}
]);
When I navigate to localhost/extension, I only see lion king Loaded app.js
Why am I not seeing "blah blah"?
Note: The reason I'm seeing lion king ( i think ) is that in the header i'm loading
<script src="/load.php?f=outlook/app.js"></script>
<script src="/load.php?f=outlook/outlookmain.js"></script>