0
這是一個簡單的角度控制器,但不起作用。我無法找到任何代碼問題。你可以嗎 ?AngularJS函數不叫
<!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}}
Ops.Thanks #Shamed – user3418042