![]() |
VOOZH | about |
The ng-bind Directive in AngularJS is used to bind/replace the text content of any particular HTML element with the value that is entered in the given expression. The value of specified HTML content updates whenever the value of the expression changes in the ng-bind directive.
Syntax:
<element ng-bind="expression"> Contents... </element>
Parameter value:
Example 1: This example implements the ng-bind Directive to bind the product of two numbers to the <span> element.
Output:
Example 2: This example implements the ng-bind Directive to bind the innerHTML of the <span> element to the variable text.
Output: