Latest web development tutorials

AngularJS ng-bind command

AngularJS Reference Manual AngularJS Reference Manual


AngularJS examples

InnerHTML bind <p> within the variable myText:

<Div ng-app = "" ng-init = "myText = 'Hello World!'">

<P ng-bind = "myText "> </ p>

</ Div>

try it"

Definition and Usage

ng-bind command tells AngularJS use or value to a variable given expression to replace the contents of an HTML element.

If a given variable or expression modified, designated to replace HTML elements will be modified.


grammar

<Element ng-bind = "expression "> </ element>

Or as a CSS class:

<Element class = "ng-bind : expression"> </ element>

All HTML elements support the instruction.


Parameter Value

value description
expression Specifies that a variable or expression to be executed.

AngularJS Reference Manual AngularJS Reference Manual