2013-07-29 205 views
4

这是我的HTML文件。 angular.js文件位于java/main/webapp/js文件夹下,当我点击它时,Intellij可以看到它,但代码不起作用!我在屏幕上{{helloMessage}}而不是“你好世界”打印出来Angular js无法正常工作

我在这里错过了什么?

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Angular test </title> 

</head> 
<body> 

<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1> 

Angular test 
<script src="js/angular.js"> </script> 
<script type="text/javascript"> 

    function HelloWorldCtrl($scope){ 
     $scope.helloMessage="Hello World"; 
    } 

</script > 

</body> 
</html> 
+0

是啊,复合视频是不正确的...也许它已经过时了? – BigOmega

回答