I have following code which i have got from internet. I have implemented the same code but it is not displaying any data.
HTML
<html data-ng-app="">
<head>
<title>Example 4: Using AngularJS Directives and DataBindings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="Styles/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container" ng-controller="SimpleController">
<h1>AngularJS Second Program</h1>
<br/>
Name:
<br />
<input type="text" data-ng-model="name" /><br/>
<br/>
<ul>
<li data-ng-repeat="cust in customers | filter:name | orderBy:'city'">{{cust.name | uppercase}} - {{cust.city | lowercase}}</li>
</ul>
</div>
<script type="text/javascript" src="Scripts/angular.min.js"></script>
<script>
function SimpleController($scope)
{
$scope.customers = [
{name:'John Doe',city:'New York'},
{name:'John Smith',city:'Pheonix'},
{name:'Jane Doe',city:'Chicago'}
];
}
</script>
<script src="Styles/jquery.min.js"></script>
<script src="Styles/js/bootstrap.min.js"></script>
</body>
I have also implemented bootstrap in it just for designing.
Previous example i have seen was this and it was working fine
<html data-ng-app="">
<head>
<title>Example 3: Using AngularJS Directives and DataBindings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="Styles/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body data-ng-init="customers=[{name:'John Doe',city:'New York'},{name:'John Smith',city:'Pheonix'},{name:'Jane Doe',city:'Chicago'}]">
<div class="container">
<h1>AngularJS Second Program</h1>
<br/>
Name:
<br />
<input type="text" ng-model="name" /><br/>
<br/>
<ul class="list-group">
<li class="list-item" data-ng-repeat="cust in customers | filter:name | orderBy:'city'">{{cust.name | uppercase}} - {{cust.city | lowercase}}</li>
</ul>
</div>
<script type="text/javascript" src="Scripts/angular.min.js"></script>
<script src="Styles/jquery.min.js"></script>
<script src="Styles/js/bootstrap.min.js"></script>
</body>
This is just my 4th AngularJS example so i have totally 0 knowledge what is happening. Thanks in advance