I am trying to run the example code given in Dave Wahlin's 60ish minutes of AngularJS but getting an error.
The error message is not very easy to understand.
<html ng-app>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js" type="text/javascript"></script>
<script type="text/javascript">
function SimpleController($scope) {
$scope.customers = [
{name: 'Dave', city: 'Phoenix'},
{name: 'Carol', city: 'Los Angeles'},
{name: 'Steve', city: 'Seattle'}
];
}
</script>
</head>
<body ng-controller="SimpleController">
<div class="container" >
<input type="text" ng-model="name" />
<ul >
<li ng-repeat="cust in customers| filter:name">{{cust.name}} - {{cust.city}}</li>
</ul>
</div>
</body>
</html>
For some reason stackoverflow is not allowing the angularjs script I have which points to the CDN. Also, there is a body tag outside the div where i have placed ng-controller = "SimpleController"