我只是角度上的初學者。是做這個小代碼。但它不工作.NG重複是例外顯示數組,但它不是。請幫助。 以下是代碼:angular.min.js:117錯誤:[ng:areq]
<!DOCTYPE html>
<html data-ng-app="">
<head>
<title>Using Angulatjs directives and Data Binding</title>
</head>
<body>
<div data-ng-controller="SimpleController">
Name:
<br>
<input type="text" data-ng-model="name" />
<h3>Using ng-repeat and filters</h3>
<ul>
<li data-ng-repeat="cust in customers"> {{cust.name}}-{{cust.city}} </li>
</ul>
</div >
<script type="text/javascript" src="angular.min.js"></script>
<script>
function SimpleController($scope)
{
$scope.customers= [
{name:'John Smith',city:'Phoenix'},
{name:'John Doe',city:'New York'},
{name:'Jane Doe',city:'Sansfransico'}
];
}
</script>
</body>
</html>
[
我越來越對console.Screen拍下面的錯誤連接了。
angular.min.js:117錯誤:[NG:AREQ] http://errors.angularjs.org/1.5.5/ng/areq?p0=SimpleController&p1=not%20a%20function%2C%20got%20undefined 在錯誤(天然) 在文件:///home/shallow/60/angular.min.js:6:412 在QB (file:///home/shallow/60/angular.min.js:23:157) at Pa(file:///home/shallow/60/angular.min.js:23:244) at file :///home/shallow/60/angular.min.js:89:77 at O(file:///home/shallow/60/angular.min.js:72:75) at n(file: (文件:///home/shallow/60/angular.min.js:64:7) at g(file:///home/shallow/60/angular.min.js:58:305) at g(file: ///home/shallow/60/angular.min.js:58:322) at g(file:///home/shallow/60/angular.min.js:58 :322)(匿名函數)@ angular.min.js:117
截圖:
[1]: http://i.stack.imgur.com/CYbHp.png
感謝很多:) –