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

The example uses di.js as service locator #8

Open
RickWong opened this issue Jan 11, 2014 · 0 comments
Open

The example uses di.js as service locator #8

RickWong opened this issue Jan 11, 2014 · 0 comments

Comments

@RickWong
Copy link

The classes in the TodoList example should not know about "ctx" because that's the container. The classes should really allow injection of the actual dependency (for example, via constructor dependency injection). The way di.js is used in the example, is called a service locator.

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

1 participant