Skip to content

About

Modification of dom-if to be if/else compliant.

Resources

Stars

12 stars

Watchers

3 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

dom-if-else

Modification of dom-if to be if/else compliant.

This is a Polymer Element providing the missing ELSE portion for the "DOM-IF" template by way of an alterative to DOM-IF.

Build Status Build Status Coverage Status

Sauce Test Status

Install

bower install --save dom-if-else

Example

    <button onclick="clicked()">Toggle</button>
    <template id="domIf" is="dom-if-else" if>
      <if-then>
          <div>1</div>
          <div>2</div>
          <div>3</div>
          Stuff
          <div>4</div>
      </if-then>
      <if-else>
          <div>e1</div>
          <div>e2</div>
          More stuff
          <div>e3</div>
      </if-else>
    </template>

    <script>
       function clicked() {
           var t=document.querySelector('#domIf');
           t.set('if',!t.if);
       }
    </script>

About

Modification of dom-if to be if/else compliant.

Resources

Stars

12 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages