-
Notifications
You must be signed in to change notification settings - Fork 30
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
New stateFor CP #31
New stateFor CP #31
Conversation
i wonder if we should allow for a callback to be provided straight to this CP to be a "factory" or builder if we need to reuse it maybe it should be a static method on the state object. var MyState = Ember.Object.extend(...);
MyState.reopenClass({
setupState(key, container) {
return this.create(...)
}
}) or is es6
|
@stefanpenner Ok take a look now. I added this: BufferedProxy.reopenClass({
initialState() {
return { content: this.get('email') };
}
}); |
LGTM |
I'm going to merge this so I can use it with my new example PR that I will be sending later today |
@thoov hey, got time to update the readme? |
Yes I will update it with my next PR |
@thoov awesome thanks! |
Solves: #28
This gives the following syntax:
@stefanpenner I need to talk with you about how we should handle "default" state. Before this was done inside of the users own service file (inside setupState override) but now this is done behind the scenes.