angular.directive.ng:bind

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

Description

The ng:bind attribute asks <angular/> to replace the text content of this HTML element with the value of the given expression and kept it up to date when the expression's value changes. Usually you just write {{expression}} and let <angular/> compile it into <span ng:bind="expression"></span> at bootstrap time.

Usage

<ANY ng:bind="expression">
   ...
</ANY>

Parameters

Example

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

Enter name: <input type="text" name="name" value="Whirled">. <br> Hello <span ng:bind="name" />! 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'); });