这是一个简单的角度控制器,但不起作用。我无法找到代码的任何问题。你能 ?
<!DOCTYPE html>
<html>
<head>
<title>AngularJS Controller</title>
</head>
<body>
<div ng-controller="SimpleController">
Name:
<br/>
<input type="text" ng-model="nameText"/>
<br/>
<ul>
<li ng-repeat="cust in customers | filter:nameText | orderBy : 'name' ">{{ cust.name }} - {{ cust.city }}
</li>
</ul>
</div>
<script src="Scripts/angular.min.js"></script>
<script>
function SimpleController ($scope){
$scope.customers = [
{ name:'Konstantinos Korovesis', city:'Pikermi' },
{ name:'Akis Manolis', city:'Argos' },
{ name:'Irem Var', city:'Nea Smirni' },
{ name:'Antonis Ralis', city:'Pallini' }
];
}
</script>
</body>
</html>
.................................这就是我在浏览器中看到的...... .............
名称:
[................]
{{cust.name}} - {{cust.city}}