0

I have a parent route. it has the model which is used by all child routes. when i consume the parent model from one of child ( first page ) I am updating the model like this:

selectedList : Ember.computed.map('model.selectedTrans', function(card,index){
        return Ember.Object.create({
            count : index + 1, //adding new info
            countSize : this.get('model.selectedTrans').length,
            durations:[6,12],
            duration:12 //adding new info
        })
    }),

after this, I am taking the user to next page ( sibling of updated page ), but when i try to fetch the updated info, I am not able to get it. the updated info not at all available there is next page.

what is the issue here? or how to update the local model? ( I am not sending or fetching from server )

3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
  • When you use `map` you are creating another list lived only in that route. Problably using `afterModel` hook to change the data will fit your needs – heat Dec 27 '17 at 12:34
  • So your child routes do not have a unique model of their own? They all just use the model from the parent? Or the children each have their own models in addition to using the parent model? Just trying to understand the problem. – Steve H. Jan 02 '18 at 21:56
  • My children have no models – 3gwebtrain Jan 03 '18 at 03:18

0 Answers0