【发布时间】:2015-10-25 11:47:05
【问题描述】:
我是 Angular 的新手,我想知道我的代码有什么问题,因为浏览器会显示这个错误:错误:[ng:areq] http://errors.angularjs.org/1.4.7/ng/areq?p0=HelloWorldCtrl&p1=not%20a%20function%2C%20got%20undefined 在错误(本机)
y el codigo es este:
<!doctype html>
<html ng-app>
<head>
<title>Angular Practice</title>
</head>
<body>
<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1>
<script src="angular.min.js"></script>
<script type="text/javascript">
function HelloWorldCtrl($scope) {
$scope.helloMessage = "Angular Practice";
}
</script>
</body>
</html>
非常感谢。
【问题讨论】:
标签: javascript angularjs