Skip to content
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

factoryFor return value should be {create, class} #20

Closed
mixonic opened this issue Feb 9, 2017 · 2 comments
Closed

factoryFor return value should be {create, class} #20

mixonic opened this issue Feb 9, 2017 · 2 comments

Comments

@mixonic
Copy link
Member

mixonic commented Feb 9, 2017

factoryFor currently returns the factory literal. Ember's factoryFor returns an object {create, class}. class is simply the registered item. create is a function accepting an argument of initial properties for the instance, and returns an instance of the factory with dependencies injected. See the above links for implementation details.

@robbiepitts was attempting to use factoryFor on glimmer/di and noted the dependencies are missing. This probably means factoryFor on glimmer/di should be refactored to match Ember's behavior or that a new API is needed for glimmer/di.

@dgeb
Copy link
Member

dgeb commented Feb 21, 2017

Implemented in #26

@dgeb
Copy link
Member

dgeb commented Feb 28, 2017

Just merged #26

@dgeb dgeb closed this as completed Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants