User Typed text bind in a page using angularJS ?
ngBind in angular it will append the DOM element of another DOM attribute values to show ng-bind named attributes.
{{Expression}} no need of expression of angularJS data appending in DOM container. ng-bind attribute is enough to accessing scope of controller value in the DOM.
Sample Declaration ng-bind :
<span ng-bind="bindName"></span>
ng-bind Example :
html:
<div ng-app="bindapp">
<div ng-controller="bindController">
<input type="text" ng-model="message" />
<p> Customer Message <span ng-bind="message"></span> </p>
</div>
</div>
javascript:
var app = angular.module("bindapp",[]);
app.controller("bindController",['$scope',function($scope){
$scope.message = "HI THIS SAMPLE MESSAGE";
}]);
Result:
Comments
Post a Comment