Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.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
Angularjs 将引用添加到角度库后,控件将消失_Angularjs - Fatal编程技术网

Angularjs 将引用添加到角度库后,控件将消失

Angularjs 将引用添加到角度库后,控件将消失,angularjs,Angularjs,我是个新手。如果我在页面顶部添加对angular lib的引用,那么我将返回空页面。不知道是什么原因。 这是一个密码 <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7

我是个新手。如果我在页面顶部添加对angular lib的引用,那么我将返回空页面。不知道是什么原因。 这是一个密码

 <html xmlns="http://www.w3.org/1999/xhtml">
 <head runat="server">
<title></title>
</head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js" type ="text/javascript" />
 <body>
 <div ng-app>
 <input type="text" id="txt1" ng-model = "data"/><br />
 The value is {{ data }}

 </div>

 </body>
</html>


该值为{data}
您应该正确关闭脚本标签,以便从
cdn
加载脚本,
script
标签不会像标签末端的
/>
那样自动关闭。因此,使用


<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js" 
  type ="text/javascript">
</script>