Updating the route model in Ember.JS

5 Apr

On my Ember routes I usually fetch the model from a service I inject.
A problem can occur when you work DDAU and you want to modify your model to reflect some user actions.
I used to think I should handle it on the route, I even used special addon for this job ember-route-action-helper but I was wrong. The right place for catching the actions and updating the model is on the Ember.Controller. So my routes are pretty thin, they only fetch the initial model and handles the error in case the model fethching fails

I guess routable component will be released soon, but in the meantime.. controllers are not dead.

Leave a Reply

Your email address will not be published. Required fields are marked *