2016-07-18 1 views
0

NGバインドが機能しない "<p><span ng-bind =" city "></span>都市です。<span ng-bind =" famous "></span>で有名です。</p>"

以下の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

実際に動作します。 JSFiddle。シンプルなタイプのエラーです。 scrの代わりにsrcを使用してください。

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

素晴らしい!ありがとう、Horst。 –

関連する問題