The ng:bind
attribute tells Angular to replace the text content of the specified HTML element
with the value of a given expression, and to update the text content when the value of that
expression changes.
Typically, you don't use ng:bind
directly, but instead you use the double curly markup like
{{ expression }}
and let the Angular compiler transform it to
<span ng:bind="expression"></span>
when the template is compiled.
<ANY ng:bind="expression"> ... </ANY>
expression – {expression} –
Expression to evaluate.
Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
Enter name: <input type="text" name="name" value="Whirled"> <br> Hello <span ng:bind="name"></span>!
it('should check ng:bind', function(){ expect(using('.doc-example-live').binding('name')).toBe('Whirled'); using('.doc-example-live').input('name').enter('world'); expect(using('.doc-example-live').binding('name')).toBe('world'); });