This package has been deprecated

Author message:

WARNING: ember-cli-if-component has been renamed to ember-cli-is-component.

ember-cli-if-component

0.4.2 • Public • Published

Ember-cli-if-component TravisCI Badge

This addon provides a new helper: is-component to be used as follows:

(is-component componentName)

The helper returns true when the first parameter can be looked up a component; false otherwise.

Example with the {{component}} helper

The {{component}} helper throws an error when an invalid component name is given as parameter. Used with {{if}}, the (is-component) helper offers a nice failsafe to avoid the rendering error when the component may not exist:

{{#if (is-component componentName)}}
  {{component componentName}}
{{else}}
  Sorry, {{componentName}} is not a known component.
{{/if}}

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Package Sidebar

Install

npm i ember-cli-if-component

Weekly Downloads

1

Version

0.4.2

License

MIT

Last publish

Collaborators

  • xcambar