My route’s model has a nested array with data that gets rendered in the template. I noticed that when doing
array.pushObject(foo), the appended data is immediately visible but when splicing an object from the array, nothing appears to change until I navigate away from and then back to the same route.
It got me wondering how Ember even tracks additions to the array in the first place. I didn’t think twice about it at first because everything just worked. I actually didn’t think that it would be an Ember Array at all when it was instantiated as I never declared it as such. The topmost array/highest level parent is a property in a Service however, so I’m guessing that might have something to do with it.
All of the additions and splices are being handled in a util. I’m not sure if that matters but I didn’t want to leave out any vital information. I was thinking that one way to handle this would be to create a component that renders this nested array and somehow re-render that component from within the util once the splice is made (hopefully this is possible). Otherwise I’m not really sure how I can tell Ember from within the util that something has been removed from the nested array and that I want this to be reflected in the template.
Thanks for any help.