Ng-Bind-1

 

In this example the "name" is the model name and is bound to the textbox and span as ng-model="name". so that means as you type in the textbox, the same textbox text will be updated in the span element. By default, the value of name model is "Example" which is added like $scope.name = 'Example' Let's see the example:

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app="app"> <div ng-controller="controllerName"> <label>Enter Text <input type="text" ng-model="name" /> </label> <br /> <b>Binded data:</b> <span ng-bind="name"> </span> </div> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', function ($scope) { $scope.name = 'Example'; }]); </script> </body> </html>
Output