vendredi 1 décembre 2017

Ember store query not working

In one of my routes, in my model() transition hook, I want to simply query all objects whose id is in a list of ids that come in through the route params. I have tried this several different ways, but no matter what I do, it always returns a full list of experiences. I am new to emberJS, but even I think this is pretty straight forward. Is there new syntax for filtering models in Ember?

import Route from '@ember/routing/route';
import RSVP from 'rsvp';

export default Route.extend({
  model(params) {
    return RSVP.hash({
      experiences: this.get('store').query('experience', { filter: { id: params.expList } }),
    });
  }
});

template


    *bunch of HTML





Aucun commentaire:

Enregistrer un commentaire