I am having a discussion with anther developer. Why Ember put the data retrieve logic inside route but controller?
And the future version Ember will deprecate controller at all?
I think the reason Ember put data retrieve logic inside route is because the data (resources) is represented by using URL in Ember, hence, it is appropriate to put data related logic inside route.
However, the other developer think chaining URL does NOT necessary means the underlying data will change, better to put the logic into the controller and perform the data related task(s) as needed.
Aucun commentaire:
Enregistrer un commentaire