how we can define a function in angular JS i was trying a function , but when i load my page it says in console SimpleController() is not a function. may b i'm doing some syntax mistake
HTML
<div ng-app>
name: <input type="text" ng-model="name">
<div ng-controller="SimpleController">
<ul>
<li ng-repeat="custName in customers | filter: name | orderBy:name">{{ custName.name }} - {{ custName.city | uppercase}} - {{ custName.address }}</li>
</ul>
</div>
</div>
My Contorller
function SimpleController($scope){
$scope.customers = [
{
name:'John Doe',
city:'Aurora',
address:'Dickenson'
},
{
name:'Daniel Pervaiz',
city:'Denver',
address:'Country Lane'
},
{
name:'Arooj Paul',
city:'Jesu',
address:'Green Valley'
}
];
}