Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/467.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 角js不起作用_Javascript_Html_Angularjs - Fatal编程技术网

Javascript 角js不起作用

Javascript 角js不起作用,javascript,html,angularjs,Javascript,Html,Angularjs,这是我的html文件。angular.js文件位于java/main/webapp/js文件夹下,当我点击它时Intellij可以看到它,但是代码不起作用!我在屏幕{{helloMessage}上看到的是一个打印,而不是“hello world” 我错过了什么 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Angu

这是我的html文件。angular.js文件位于java/main/webapp/js文件夹下,当我点击它时Intellij可以看到它,但是代码不起作用!我在屏幕{{helloMessage}上看到的是一个打印,而不是“hello world”

我错过了什么

<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>

角度测试
{{helloMessage}}
角度测试
函数HelloWorldCtrl($scope){
$scope.hellomemessage=“Hello World”;
}
如果您忘记了,请将其放入
正文
标签中:

 <body ng-app>


看一看。

是的,那部pluralsight视频不对。。。也许已经过时了?