AngularJS

How to bind the value of HTML controls in AngularJS

Namecheap.com

In this tutorial I'm going to show you to bind values of HTML input controls. We can use ng-bind directive to do this task. ng-bing directive always monitoring the HTML input controls, when it is found value, it stores the value in a data container and bind the value in expression. It does a simple task, when user enter value it keeps the value in a variable and prints the variable in expression.  

 

<html>
 
<head>
 
[removed][removed]
 
</head>
 
<body>
 


 


 

 
ng-bind="text">


 

 
</body>
 
</html>
 
ng-bind="text">


 

 
</body>
 
</html>

 

 

Note that, we can also use {{}} curly braces for doing the same task.


Namecheap.com
You May Like This
Comments
  • Image
    santosh sahu

    Install part

    5th October 2016 11:51:14
Leave Comment
Recently discussion