dimanche 24 janvier 2016

What exactly classNameBindings is doing?

I'm new to Ember and I'm following a tutorial which contains code for component:

export default Ember.Component.extend({
  tagName: 'li',
  classNameBindings: ['editing'],
  editing: false,
  actions: {
    editTodo() {
      this.toggleProperty('editing');
    }
  }
});

I don't understand what classNameBindings is doing. From documentation I've learned that classNameBindings is a list of properties of the view to apply as class names, but I also have editing property on the component. How existence of this property effects this process of creating class names?

Thank you for any help :-)




Aucun commentaire:

Enregistrer un commentaire