typescript dependency injection framework

扶醉桌前 提交于 2019-12-24 00:48:49

问题


I am writing a simple library using TypeScript (not using angular). I need to use a DI framework in this library. I checked out the DI framework in Angular2, but this seems like an overkill and I need to wrap my whole library in an Angular module which I don't want to do.


回答1:


I don't use DI in TypeScript/ES6 for production (yet) because they are not yet finalized.

For experimenting, I used needlepoint which was at the time I was using ES6.

But for typescript, typescript-ioc looks like it's a better candidate. It has both IOC and DI.



来源:https://stackoverflow.com/questions/41971364/typescript-dependency-injection-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!