lundi 15 août 2016

Ember retain query parameters while manually refreshing the page

I am using ember 2.7.0.while manually refreshing the page ember clears the ember-data as well us query parameters, so i am unable to load the page in setupController while refreshing. Is there any possible way to retain both model & query parameters, at least retaining query parameter would be fine to reload my page.

route.js

model(params) {   
return this.store.peekRecord("book",params.book_id);

},

setupController(controller,model,params){
if(!model){
    //fetch book record again if the model is null
}
controller.set('msisdn',params.queryParams.isdn);
controller.set('book',model);
}

Any help should be appreciable.




Aucun commentaire:

Enregistrer un commentaire