I'm reading through the Ember.js API reference of the set()
method and I'm not understanding one particular paragraph.
Computed Properties
If you try to set a value on a key that has a computed property handler defined (see the get() method for an example), then set() will call that method, passing both the value and key instead of simply changing the value itself. This is useful for those times when you need to implement a property that is composed of one or more member properties.
I understand how set()
works independently, but setting computed properties (the function) is still not clicking, even after reading this paragraph.
Could anyone please give additional explanation or an example?
Aucun commentaire:
Enregistrer un commentaire