Skip to content

Instantly share code, notes, and snippets.

@appleton
Created January 20, 2015 10:09
Show Gist options
  • Save appleton/c2819525755eb60cea09 to your computer and use it in GitHub Desktop.
Save appleton/c2819525755eb60cea09 to your computer and use it in GitHub Desktop.
Is it possible to add an {{else}} block to an Ember Component?
{{#feature-check name="awesome-feature"}}
It's enabled
{{else}}
It's disabled
{{/feature-check}}
@appleton
Copy link
Author

I have a feature-check component which conditionally renders the block content depending on whether a feature flag is enabled. I'd love to be able to add an {{else}} section to the block to render alternative content, just like I can with if.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment