jeudi 25 août 2022

@computed property with this.args in ember.js

Some of codes contains @computed("args.param") property behind of getters in ember.js. But I can use this.args.param in the getters without @computed("args.param"), and there is no problem in it. What's the differece between @computed("args.param") using and not using?

between

  @computed('args.date')
  get currentMonth() {
    return moment(this.args.date, 'YYYY-MM').startOf('month');
  }

and

  get currentMonth() {
    return moment(this.args.date, 'YYYY-MM').startOf('month');
  }



Aucun commentaire:

Enregistrer un commentaire