Skip to content

Instantly share code, notes, and snippets.

@wagenet
Created February 27, 2015 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wagenet/989b759848e8ee8043a8 to your computer and use it in GitHub Desktop.
Save wagenet/989b759848e8ee8043a8 to your computer and use it in GitHub Desktop.
<element tagName='input' value={{value}}>
{{!-- I should have added `disabled={{disabled}}` but how do I know that? --}}
export Ember.Component.extend(DisabledMixin, {
value: 'invalid'
});
export Ember.Mixin.create({
attributeBindings: 'disabled',
disabled: function(){
return this.get('value') === 'invalid';
}.property()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment