I'm encountering an issue while attempting to link a controller to my view. The error I keep receiving is as follows:
Error: ng:areq Bad Argument Argument 'TestAppCtrl' isn't a function, received undefined
Here's the content of my view:
<!DOCTYPE html>
<html ng-app lang="en">
<!-- Head section here -->
<body ng-app="app">
<div class="container">
<!-- Resume section -->
<div ng-controller="TestAppCtrl" id="TestAppCtrl">
{{data}}
</div>
</div>
</body>
</html>
This is the related controller code: // Generated by CoffeeScript 1.9.3 var app;
app = angular.module('app', []);
console.log("hello world");
app.controller('TestAppCtrl', ['$scope', function($scope) {
$scope.data = [1, 2, 3, 4, 5];
}]);
Although the correct controller is being detected (as evidenced by the console log), the data from the controller isn't binding in the view and instead appears as {{data}}. Any suggestions on resolving this issue would be greatly appreciated. Thank you.