Sunil Mallikarjun Sunil Mallikarjun - 4 months ago 7
HTML Question

NG-bind not working on "<p>This is <span ng-bind= "city"></span> city.It is famous for <span ng-bind= "famous"></span> .</p>"

I'm new to coding

in below pgm can anyone help me to find why

ng-bind
is not working?

Thanks in advance.

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

Answer

It actually does work. JSFiddle. It is a simple type error. Use src instead of scr.

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