NG-bind没有工作&#34; <p>这是<span ng-bind =“city”> </span> city.It以<span ng-bind =“famous”> </span>而闻名。 </p>&#34;

时间:2016-07-18 07:21:54

标签: javascript html angularjs

我是新编码

在pgm下面有人可以帮我找到ng-bind无效的原因吗?

提前致谢。

<html>
<head>
<title>Angular js</title>
</head>
<body>
<script scr="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js">     </script>
<div ng-app="">
<p>Welocme!Please enter values.</p>
<p>This is _________ (a)city.It is famous for __________(b).</p>
<p>Please enter your inputs.</p>   
<p>a.<input type="text" ng-model="city"> b.<input type="text" ng-model="famous"> </p>

<p>This is <span ng-bind= "city"></span> city.It is famous for <span ng-bind= "famous"></span> .</p>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

它确实有效。的 JSFiddle 即可。这是一个简单的类型错误。使用src代替scr

src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"