Nanda Kishore

Nanda Kishore

  • NA
  • 65
  • 13.6k

What is the wrong in the below code? I can't find the error.

Jan 28 2015 2:03 AM
What is the wrong in the below code? I can't find the error.Data is not binding to the list. 


<!DOCTYPE html>
<html data-ng-app>
<head>
<title></title>
</head>
<body>

<div data-ng-controller="SimpleController">
<h3>Controller Example</h3>
<ul>
<li data-ng-repeat="cust in customers">
{{cust.name}} - {{cust.code}}
</li>
</ul>

</div>
<script src="angular.min.js"></script>
<script>
function SimpleController($scope) {
$scope.customers = [
{
name: 'JQuery', code: 'JQ'
},
{
name: 'JScript', code: 'JS'
},
{
name: 'CSharp', code: 'C#'
}
];
}
</script>
</body>
</html>



Regards,
Nanda Kishore.CH

Answers (2)