This question already has an answer here:
- AngularJS - Value attribute on an input text box is ignored when there is a ng-model used? 6 answers
I've following simple HMTL code. This HTML page has included Angular JS library.
<!DOCTYPE html>
<html>
<head>
<script src= "http://ift.tt/1vSwvzy"></script>
</head>
<body>
<div ng-app="">
<p>Input something in the input box:</p>
<p>Name: <input type="text" ng-model="name" value="John"></p>
<p ng-bind="name"></p>
</div>
</body>
</html>
I'm not understanding why the value set for input text field is not getting displayed when the page is viewed in a browser?
Then I removed the AngularJS library inclusion code from the above HTML code then the value "John" got displayed into input text field properly.
So what's the issue here? Please provide me appropriate, crisp and meaningful answer.
Thanks.
Aucun commentaire:
Enregistrer un commentaire