As a newcomer to AngularJs, I have recently developed a test application using version 1.3.x and encountered a particular issue. Below is the HTML and JS code related to the problem:
<div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var angular.module('ControllerExample', []).controller('SimpleController', SimpleController);
function SimpleController($scope) {
$scope.customers = [
{ name: 'Customer 1', city: 'Gampaha'},
{ name: 'Customer 2', city: 'Negombo'},
{ name: 'Customer 3', city: 'Gampaha'},
{ name: 'Customer 4', city: 'Gampaha'},
{ name: 'Customer 5', city: 'Kadawatha'}
];
}
<!DOCTYPE html>
<html lang="en" ng-app="ControllerExample">
<head>
<meta charset="utf-8">
<title>AngularJS App</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div ng-controller="SimpleController">
Customer Name:
<input type="text" ng-model="name" />
<h3>Adding a Simple Controller</h3>
<ul>
<li ng-repeat="cust in customers">{{ cust.name | uppercase }} - {{ cust.city }}</li>
</ul>
</div>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
</body>
</html>