ngBindTemplate (directive in module ng )

Description

The ngBindTemplate directive specifies that the element text should be replaced with the template in ngBindTemplate. Unlike ngBind the ngBindTemplate can contain multiple {{ }} expressions. (This is required since some HTML elements can not have SPAN elements such as TITLE, or OPTION to name a few.)

Usage

as attribute
<ANY ng-bind-template="{string}">
   ...
</ANY>
as class
<ANY class="ng-bind-template: {string};">
   ...
</ANY>

Parameters

Example

Try it here: enter text in text box and watch the greeting change.

Source







Demo