dimanche 4 septembre 2016

Display a subset of model data in emberjs

I have the following in my routes

import Ember from 'ember';

export default Ember.Route.extend({
    model: function() {
        return this.store.query('post',{published:true});
    }
});

and a post-viewer component that renders the model. the problem that i am facing with is filter. How can i implement the same without loading the models each time. Currently i am just passing the models in the component and using the following




To render the elements. What is the proper way by which lets say i can filter them based on title containing some specific keyword. I tried using this.store.query inside the each loop but that did not work out.




Aucun commentaire:

Enregistrer un commentaire