My angularjs controller function is never called. I see all the js files included in my sources, it's just not ever hitting the initialization of my controller. What is wrong with this code?
eventListCtrl.js:
eventsApp.controller('eventListCtrl', ['$scope', function ($scope) {
// this code is never called
alert('controller initializing');
$scope.name = "Test";
}]);
app.js:
'use strict';
var eventsApp = angular.module('eventsApp', []);
Index.cshtml:
<div ng-controller="eventListCtrl">
<div class="row">
<div class="spann11">
<h2>{{name}}</h2>
</div>
</div>
</div>
<script src="/scripts/vendor/angular.js"></script>
<script src="/scripts/app.js"></script>
<script src="/scripts/controllers/eventListCtrl.js"></script>
ng-app="eventsApp"anywhere? And did you recreateeventsAppwithin your controller?ng-appoutside the<div ng-controller="...">.