Home » AngularJS ng-bind Directive

AngularJS ng-bind Directive

by Online Tutorials Library

AngularJS ng-bind Directive

The AngularJS ng-bind directive replaces the content of an HTML element with the value of a given variable, or expression. If you change the value of the given variable or expression, AngularJS changes the content of the specified HTML element as well as.

It is an alternative to the interpolation directive.

Syntax:

As attribute:

As CSS class:

Parameter explanation:

expression: It specifies a variable, or an expression to evaluate.

Let’s take an example to demonstrate ng-bind directive.

See this example:

Test it Now

You may also like