我只是角度上的初学者。是做这个小代码。但它不工作.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
感谢很多:) –