-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Is there any useContainer(Container); method like routing-controller? #11
Comments
Cast @iyobo , I think it good idea to support basic DI, same as type-graphql does. I suggest it as option for bootstrapMiddleware instead of function call |
This will be added soon.
|
Hi @iyobo, thank you for reply. Honestly I decided to use koa with router directly and avoid any abstractions, but hope this can be useful for other people. So for case of koa, dependency injection is just like this: Functional programming rules, and I highly inspired by way choosen by Vue 3, they decided to use functional style api versus classes with decorators. We should follow the nature, since it doesn’t have unnecessary abstraction and learn from it. Cheers. |
@georgyfarniev
The dependency injection concerns of koa-ts-controllers as of right now revolve around ways to get things out of ctx e.g
|
I am still considering the useContainer paradigm. More to come soon! |
Thanks for update, @iyobo! |
Hi
I was suggested to use koa-ts-controller as i was using routing controller before.
How do we inject Container from typedi like routing-controller package
useContainer(Container);
Thanks
Ajay
The text was updated successfully, but these errors were encountered: