-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Object And Array Controllers With Ember.Controller and remove ItemControllers #379
Comments
Might want to lump |
@rwjblue 👍 added item controller. |
I can work on this. |
@teddyzeenny should I branch off master or stable? I noticed both of those branches have ~60 failing tests. |
@camskene hey, sorry for the mess. Regenerator library made a To answer your question, all PRs go against master, so always branch off master. |
Should be fixed with #384. Make sure to |
You won't be able to use block params ( |
@camskene You working on this one? Otherwise I can pick it up. |
@bjoska If you could pick it up that would be great! I was investigating last night and it's a bit beyond my ember foo... |
Got it! Cheers!
|
If anyone has any questions feel free to ping me ( |
Hi teddyzeenny, In the templates we have lot of code that looks like the following: What do you think is the best way to refactor the code in the ObjectController so that it can be used multiple times? |
Closing this as these controller types have been removed already. |
Part of #360
Ember.ObjectController
,Ember.ArrayController
anditemController
are going away. We need to replace them withEmber.Controller
.app/controllers/object.js
that exportsEmber.Controller
. This will prevent Ember from automatically creating object controllers:Ember.ObjectController
withEmber.Controller
. This means that properties that access model properties will need to usemodel.propertyName
instead of justpropertyName
since the Controller will no longer be a proxy.app/controllers/array.js
that exportsEmber.Controller
. This will prevent Ember from automatically creating array controllers:Ember.ArrayController
withEmber.Controller
. This means that all array methods/properties called on the controller will need to be called on the model instead. Example:this.forEach
will need to bethis.get('model').forEach
,this.get('length')
will need to bethis.get('model.length')
.sortProperties
will also no longer work. We would need to create a computed property that sorts the model.{{#each}}
and{{#each controller}}
need to be replaced with{{#each model as |item|}}
.itemController
in{{#each}}
helpers with components.Old Version:
New Version:
The text was updated successfully, but these errors were encountered: