New ember rules states that we need to use the below pattern
propObserver: Ember.observer(function () {
//code
})
instead of
propObserver: function() {
//code
}.observers('someProp')
Before updating ember we could do the below
propObserver: function () {
//code
}.observes('someProp').on('init')
How to achieve this cascading?
Now i know we can do this separately
propObserver: Ember.observer('someProp', function () {
//code
})
propObserver: Ember.on('init', function () {
//code
})
Aucun commentaire:
Enregistrer un commentaire