I want to remove a observer I registered at a current point. Say I got following component:
export default Ember.Component.extend({
observeSomeProp: function() {
//do something
}.observes('someProp'),
obserOtherProp: function() {
if( condition ) {
//remove observeSomeProp
}
}.observes('otherProp')
});
I am reading the docs, the removeObserver function needs three arguments 'key', 'target' and 'method'. I suppose the 'method' argument would be observeSomeProp
for given example, but what about the 'key' and 'target'?
Aucun commentaire:
Enregistrer un commentaire