samedi 4 mars 2017

How to extract certain value from a collection of ember data?

Code below is my current solution,

  tagsValue: Ember.computed('tags.@each', {
    get() {
      const out = [];
      this.get('tags').forEach((tag) => {
        out.push(tag.get('value'));
      });
      return out;
    }
  }),

Is there a better way to do so?




Aucun commentaire:

Enregistrer un commentaire