angular.directive.ng:multiple

Description

The HTML specs do not require browsers to preserve the special attributes such as multiple. (The presence of them means true and absence means false) This prevents the angular compiler from correctly retrieving the binding expression. To solve this problem, we introduce ng:multiple.

Usage

<ANY ng:multiple="template">
   ...
</ANY>

Parameters

Example

  Check me check multiple: <input type="checkbox" ng:model="checked"><br/>
  <select id="select" ng:multiple="{{checked}}">
    <option>Misko</option>
    <option>Igor</option>
    <option>Vojta</option>
    <option>Di</option>
  </select>
  it('should toggle multiple', function() {
    expect(element('.doc-example-live #select').prop('multiple')).toBeFalsy();
    input('checked').check();
    expect(element('.doc-example-live #select').prop('multiple')).toBeTruthy();
  });