lundi 14 août 2017

My Model is not called when page loads

when new page loades I am trying to fetch data in my route but I am not getting any response from my model method. rest of all other methods called. what is wrong here?

here is my code :

import Ember from 'ember';

export default Ember.Route.extend({
    model(params){ //not calling
        console.log('got the model', params );
        return this.store.peekRecord('card-list', params.id );
    },

    setupController(controller,model) {//called
        console.log("super")
        this._super(...arguments);
        console.log("model is", controller,"\n", model );
    },

    init(){//called
        console.log("init calledx"); 
    }

});




Aucun commentaire:

Enregistrer un commentaire