karthi keyan

karthi keyan

  • NA
  • 48
  • 6.2k

i am new to angularjs...can anyone help me?

Aug 3 2016 7:13 AM
<!DOCTYPE html>
<html data-ng-app="">
<head>
<title>Using AngularJS Directives and Data Binding</title>
</head>
<body>
<div data-ng-controller="Simple">
Name:
<br />
<input type="text" data-ng-model="name" />
<br />
<ul>
<li data-ng-repeat="cust in customers | filter:name | orderBy:'city'">
{{cust.name}} - {{cust.city}}
</li>
</ul>
</div>
<script src="Scripts/angular.min.js"></script>
<script>
function Simple($scope){
$scope.customers = [
{ name : 'paul', city : 'mumbai' },
{ name : 'kicha', city : 'africa' },
{ name : 'ram', city : 'nigeria' }
];
}
</script>
</body>
</html>
Error:
angular.min.js:495 Error: [ng:areq] http://errors.angularjs.org/1.5.8/ng/areq?p0=Simple&p1=not%20a%20function%2C%20got%20undefined
at Error (native)
at http://localhost:5540/Scripts/angular.min.js:7:499
at sb (http://localhost:5540/Scripts/angular.min.js:70:27)
at Pa (http://localhost:5540/Scripts/angular.min.js:70:136)
at http://localhost:5540/Scripts/angular.min.js:365:237
at ag (http://localhost:5540/Scripts/angular.min.js:283:239)
at p (http://localhost:5540/Scripts/angular.min.js:263:274)
at g (http://localhost:5540/Scripts/angular.min.js:233:403)
at g (http://localhost:5540/Scripts/angular.min.js:233:428)
at g (http://localhost:5540/Scripts/angular.min.js:233:428)(anonymous function) @ angular.min.js:495
 
 

Answers (6)