I have two computed properties that should fire after month
property changes. However only one of them fires and the other one doesn't.
classesForMonth
fires once on init (when month
is set for the first time) and doesn't fire after that.
I think it may be caused by classesForMonth.content
syntax I have to use in template to render the Object received from the Promise after querying DS.
Please help me to get on a right track.
classesForMonth: function() {
console.log('hi im querying store') // doesn't fire on month change
return this.get('store').query('class', {
month: this.get('month') + 1,
});
}.property('month'),
formattedMonth: function(){
console.log('hi im formatting month') // does fire on month change
return moment.months()[this.get('month')]
}.property('month')
Aucun commentaire:
Enregistrer un commentaire