我正在尝试制作我的第一个AngularJS项目。我在项目配置方面遇到问题。首先我创建了一个Java项目AngularJSExample。然后我将它转换为AngularJS项目。我为Tern项目配置了脚本路径。 hello.html不知道什么是问候语。你能告诉我为什么?AngularJS项目配置
这些都是我的文件:
<html ng-app>
<head>
<script src="angular.js"></script>
<script src="controllers.js"></script>
</head>
<body>
<div ng-controller='HelloController'>
<p>{{greeting.text}}, World</p>
</div>
</body>
</html>
var myController = angular.module('myApp',[]);
myController.controller('HelloController', ['$scope', function($scope) {
$scope.greeting ={
text : 'Hello'
};
}]);
这没有帮助。我在我的控制台中有这个:Tern request#angular_type:{“query”:{“type”:“angular”,“subtype”:“type”,“angularTypes”:[“module”],“expressio n”: “myApp”,“scope”:{“file”:[“projectFolders/js/controllers.js”]}} {“type”:“Module”,“name”:“myApp”,“origin”:“项目文件夹/ js/controllers.js“,”ang ularType“:”module“,”module“:”myApp“} Tern响应#angular_type 23ms:Tern request#angular_type:{”query“:{”type“:”角”, “子类型”: “类型”, “angularTypes”:[ “控制器”], “expre裂变”: “HelloController中”, “范围”:{ “模块”: “对myApp”}, “文件”:[ “projectFolders/js/c ontrollers.js”]}} – Mimo 2014-09-23 12:48:08