i'm new to angular js
and i'm following a tutorial and i'm getting this error Argument 'CustomersController' is not a function, got undefined
my code looks like this
<!DOCTYPE html>
<html ng-app>
<head>
<title>Filters</title>
<style type="text/css">
</style>
</head>
<body ng-controller="CustomersController">
<h2>Customers</h2>
Filter: <input type="text" ng-model="customerFilter.name"/>
<br /><br />
<table>
<tr>
<th ng-click="doSort('name')">Name</th>
<th ng-click="sdoSort('city')">City</th>
<th ng-click="doSort('total')">Order Total</th>
<th ng-click="doSort('joined')">Joined</th>
</tr>
<tr ng-repeat="cust in customers | filter:customerFilter | orderBy:sortBy:reverse">
<td>{{ cust.name | uppercase }}</td>
<td>{{ cust.city | lowercase}}</td>
<td>{{ cust.total | currency:'INR ' }}</td>
<td>{{ cust.joined | date }}</td>
</tr>
<span>Total customers : {{ customers.length }}</span>
</table>
<script type="text/javascript" src="js/angular.js"></script>
<script type="text/javascript" src="app/controller/customerController.js"></script>
</body>
</html>
now this is my CustomerController.js file
function CustomersController($scope){
$scope.sortBy = 'name';
$scope.reverse = false;
$scope.customers = [{joined:'2000-12-02',name:'John',city:'Chandler',total:'9.9959'},{joined:'1965-12-02',name:'Jon',city:'Chand',total:'9.959'},{joined:'1962-12-02',name:'On',city:'Chand',total:'9.9'},{joined:'1925-12-02',name:'Ron',city:'Chand',total:'10.23'}];
$scope.doSort = function(propName){
$scope.sortBy = propName;
$scope.reverse = !$scope.reverse;
};
}
i use google chrome's console so saw this error, i'm unable to find out what is wrong with my code as i'm following the instructor very well, i'm using angular js 1.3.11 version