Anyone notice the docs at Introduction - Controllers - Ember Guides on controllers no longer says they are being phased out. More that they should be thought of as a “default component” that the router fires off.
Do you have a reference to where it’s mentioned that it’s going to be phased out?
Yehuda mentioned in a tweet before that the phasing out of controllers is something that’s pushed to as far as Ember 3.0. And Ember 3 is not even announced. I believe he’s implying it’s something that’s probably will never happen.
IMO, it’s something that’s probably will never happen. Controllers are still too special to categorize them to be the same as components. This is especially true to route associated controllers. You can inject controllers to any components. But if controllers becomes components, that means either you stop allowing these injections to happen or allow components to be injected into components. I believe both of them are bad ideas.
Thats the point Im making, it used to be here in the very first paragraph:
It’s changed recently.
I believe you are right.
https://github.com/emberjs/guides/commit/94e8167e04403b81e4837d587a119089ff8007bc
Thanks, feels like routers will be rendering out components eventually. I do think it makes sense not to distinguish component classes from controller.
When I create a router with ember-cli I am usually frustrated that it doesn’t just generate a component class to go with it, given that they keep saying controllers are going obsolete I usually end up just manually having to put in a component into the template that the ember-cli generates with a router. Which seems overkill…would make more sense that a route has a default component, and is created as such along with a js file.