Angular2 DI in Typescript. Can we use it in node.js / non-angular projects?

前端 未结 6 887
孤独总比滥情好
孤独总比滥情好 2020-12-05 13:41

Was the angular2 dependency injection container designed for standalone use, and is it possible to use it for typescript/javascript server-side applications ?

I open

6条回答
  •  有刺的猬
    2020-12-05 14:16

    I doubt it, it doesn't look like it has been extracted into a component. It's a bit sad that major frameworks like Angular still have this monolithic approach, I would rather like to see Component oriented frameworks like Symfony, but JavaScript isn't quite there yet.

    In the meantime you have InversifyJS that doesn't look bad.

提交回复
热议问题