Ember Truth Helpers for HTMLBars ![Build Status](https://camo.githubusercontent.com/43fdb5070b254f9a6133c67d4d3bce76e43bb6998b45b152692c142e08dac926/68747470733a2f2f7472617669732d63692e6f72672f6a6d757270687961752f656d6265722d74727574682d68656c706572732e7376673f6272616e63683d6d6173746572)
Helpers for HTMLBars {{#if}}
& {{#unless}}
.
eq
, not
, and
, or
and is-array
.
eq
{{#if (eq 1 2)}} 1 == 2 {{/if}}
{{#unless (eq 1 2)}} 1 != 2 {{/unless}}
not
{{#if (not hasCrayons)}} I don't have crayons {{/if}}
{{#if (not hasCrayons hasPaper)}} I don't have crayons or paper {{/if}}
and
{{#if (and hasCrayons hasPaper)}} I have crayons and paper {{/if}}
or
{{#if (or hasCrayons hasPaper)}} I have something {{/if}}
is-array
{{#if (is-array siblings)}}
{{#each siblings as |sibling|}}
My sibling: {{sibling}}
{{/each}}
{{/if}}
in combination
{{#if (and (not model.isLoading) model.isError)}}
There was an error loading the model
{{/if}}
stand alone
{{and itsCold myJumper}}
<!--returns `myJumper` if `itsCold` is truthy, otherwise returns `itsCold`-->
ember install:addon ember-truth-helpers
git clone https://github.com/jmurphyau/ember-truth-helpers.git
npm install
bower install
ember server
- Visit your app at http://localhost:4200.
ember test
ember test --server
For more information on using ember-cli, visit http://www.ember-cli.com/.