Skip to content

Commit

Permalink
[DOC release] Update class_names_support.js to include binding classe…
Browse files Browse the repository at this point in the history
…s to false properties

(cherry picked from commit 3f4327d)
  • Loading branch information
qpowell authored and kategengler committed Jun 19, 2018
1 parent 5028c75 commit 84e3922
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/ember-views/lib/mixins/class_names_support.js
Expand Up @@ -79,6 +79,18 @@ export default Mixin.create({
});
```
If you would like to specify a class that should only be added when the
property is false, you can declare a binding like this:
```javascript
// Applies the 'disabled' class to the view element
import Component from '@ember/component';
Component.extend({
classNameBindings: ['isEnabled::disabled'],
isEnabled: false
});
```
This list of properties is inherited from the component's superclasses as well.
@property classNameBindings
Expand Down

0 comments on commit 84e3922

Please sign in to comment.