AngularJS JavaScript Framework

angularJS bind input variable

Posted by

The blog shows the simple example of how to bind the input variables in the angularJS .

The ng-bind directive  binds the values of AngularJS application data to HTML input controls.


<div ng-app = ""> 
   <p>Enter your Name: <input type = "text" ng-model = "userName"></p>

Sample Code:

<script src = “”></script>

<h1>Bind Input Variable</h1>

      <div ng-app = “”>
<p>Enter your Name: <input type = “text” ng-model = “name”></p>
<p>Hello <span ng-bind = “name”></span>!</p>


ngularJS bind input variable
ngularJS bind input variable