I have a new angular app and I can't figure out why my controller is not registering. The full error I get is:
The controller with the name 'DashboardController' is not registered.
I have the app module and dashboard controller in two separate files:
app.js:
var HtJobPortal = (function () {
'use strict';
angular.module('HtJobPortal', []);
})();
DashboardController:
(function () {
'use strict';
HtJobPortal.controller('DashboardController', []);
var vm = this;
vm.title = 'DashboardController';
})();
And my HTML is just attempting to extract the title:
<body ng-controller="DashboardController">
{{title}}
<!-- JS Scripts -->
<script src="Scripts/jquery-3.1.1.min.js"></script>
<script src="Scripts/bootstrap.min.js"></script>
<script src="Scripts/angular.js"></script>
<!-- Application Directive -->
<script src="Scripts/controllers/app.js"></script>
<!-- Controllers -->
<script src="Scripts/controllers/DashboardController.js"></script>
</body>
Can anybody help point out what I'm missing here?