Skip to content

Instantly share code, notes, and snippets.

@e00dan
Last active August 29, 2015 14:13
Show Gist options
  • Save e00dan/7f6016e426005146f593 to your computer and use it in GitHub Desktop.
Save e00dan/7f6016e426005146f593 to your computer and use it in GitHub Desktop.
ObjectController and ArrayController deprecated info
The stated recommendation is to use Controller (but not ObjectController or ArrayController, which are already deprecated on canary).

emberjs/rfcs#15 (comment)

Initially, we will continue to support routing to a controller+template, so nothing will break. Going forward, routes will route to a component instead.

In order to do that refactoring, several things will change:

Instead of referring to model properties directly (or on this), you will refer to them as model.propName.
Similarly, computed properties that move to your component will need to depend on model.propName if they are migrated from an ObjectController.
In both cases, the short version is that you can no longer rely on the proxying behavior of ObjectController or ArrayController, but you can remedy the situation by prefixing model. to the property name.

emberjs/rfcs#15

Also, will controllers remain (as item-controllers) and virtual/generated controllers for these new, routable components? Although I assume they remain, perhaps that could be clarified in the section on routable components.
While they will still be supported through the plugin, we intended to remove Ember.Controller, Ember.ObjectController, and Ember.ArrayController from the framework, including their use as item controllers. Our hope is that you can express the same concepts using the more flexible primitives of template helpers and components. As we said to @mgenev above, please let us know of cases where it’s not obvious how you’d accomplish this and we’ll double-check our assumptions.

emberjs/rfcs#15 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment