Skip to content Skip to sidebar Skip to footer

Ember - Nested Child Route Loses Model Upon Route Refresh/reload

I have a nested route, which when refreshed loses the model and displays blank page. Code as below: Router: app.Router.map(function(){ this.resource('main',{path:''}, function(

Solution 1:

I did solve this by eventually calling ajax again on refreshing the details page. I did place a check though, that if "this.modelFor('mainSummary')" is available then return this model only, otherwise get model from ajax. This worked for me.

But I am still wondering, that ideally it should have been by itself, i.e. the as i refresh, the ajax on /main/summary should have been called itself and thereby rendering details, once model was available.

Post a Comment for "Ember - Nested Child Route Loses Model Upon Route Refresh/reload"