lundi 22 mai 2017

EmberJS controllers vs routes

I know this question might seem a little duplicate but the other version of this question is old and some of the content (such as Views) aren't even a part of ember anymore.

I'm about 4 weeks into my internship as a front-end developer working with EmberJS. I still don't understand when it's better to use the route over the controller or vice-versa. It seems to me that every action in the route can also be used in the controller.

The one recent thing I heard was that ember routes should be stateless where as controllers should be stateful.

What is the current state of controllers and routes. When should one be used over the other?




Aucun commentaire:

Enregistrer un commentaire