AngularJs ng-bind
AngularJs ng-bind : AngularJs ng-bind used to bind data with the HTML DOM.
Angularjs ng-bind very simple Example
<div ng-app="" > <p>Sum = <span ng-bind ="10*10"></span></p> </div>
Example 1
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script> </head> <body> <div ng-app="" > <p>Sum = <span ng-bind ="10*10"></span></p> </div> </body> </html> |
Example of ng-bind with ng-init
Example 2
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script> </head> <body> <div ng-app="" ng-init="a=10;b=15"> <p>Multiple =<span ng-bind="a*b"><.span> </p> <p>Division =<span ng-bind="a/b"><.span> </p> </div> </body> </html> |
Advertisements