angular.directive.ng:hide

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

Description

The ng:hide and ng:show directives hide or show a portion of the HTML conditionally.

Usage

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

Parameters

Example

   Click me: <input type="checkbox" name="checked"><br/>
   Show: <span ng:show="checked">I show up when you checkbox is checked?</span> <br/>
   Hide: <span ng:hide="checked">I hide when you checkbox is checked?</span>
  it('should check ng:show / ng:hide', function(){
    expect(element('.doc-example-live span:first:hidden').count()).toEqual(1);
    expect(element('.doc-example-live span:last:visible').count()).toEqual(1);

    input('checked').check();

    expect(element('.doc-example-live span:first:visible').count()).toEqual(1);
    expect(element('.doc-example-live span:last:hidden').count()).toEqual(1);
  });