lundi 31 août 2015

ember-data reload model in route to sideload relations (only if they are missing)?

My app has an index page listing all items, when clicking an item I want to reload the model for that item, as the single-model API endpoint sideloads the relations.

But I only want to reload the model if but only if they aren't already fetched.

Is there any way to achieve this? I've tried something like:

return this.store.find('todo-list', params.id).then((model) => model.reload());

but that didn't seem to work + it will always reload regardless of the relations already being loaded.




Aucun commentaire:

Enregistrer un commentaire