0
我是一個新手的角度JS,發現了一個奇怪的疑難問題無法運行下面的代碼:角JS:控制器語法
hello.html的
<html ng-app>
<head>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="controller.js"></script>
</head>
<body>
<div ng-controller='HelloController'>
<p>{{greeting.text}}, World</p>
</div>
</body>
</html>
controller.js
function HelloController($scope) {
$scope.greeting = { text: 'Hello' };
}
http://stackoverflow.com/questions/26646941/getting-an-error-when-使用-NG控制器功能於angularjs-VER-1-3-0/26647015#26647015 –