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 injections #26

Merged
merged 2 commits into from
Feb 28, 2017
Merged

Conversation

pittst3r
Copy link
Contributor

This implements the factoryFor interface specified in https://github.com/emberjs/rfcs/blob/master/text/0150-factory-for.md and introduces concept of Creator (which is distinct from Factory). One registers Creators and retrieves Factories.

@dgeb
Copy link
Member

dgeb commented Feb 21, 2017

Thanks @robbiepitts!

This LGTM. I think that tracking Creators separately from instances in the Registry (as described in #21) will pair nicely with this PR.

src/container.ts Outdated
}

factoryFor(specifier: string): Factory<any> {
let factory = this._factoryLookups[specifier];
let creator: FactoryDefinition<any> = this._creatorLookups[specifier];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/creator/factoryDefinition/

or simply

s/creator/definition/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, good catch

@pittst3r pittst3r force-pushed the factory-for-injections branch from f3797f7 to 139beed Compare February 28, 2017 20:19
@dgeb dgeb merged commit 16ab76e into glimmerjs:master Feb 28, 2017
@pittst3r pittst3r deleted the factory-for-injections branch February 28, 2017 20:38
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

Successfully merging this pull request may close these issues.

2 participants