All Projects → wszgrcy → static-injector

wszgrcy / static-injector

Licence: other
静态依赖注入在Typescript中使用

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to static-injector

Container
🚀 PHP Service Container with fast and cachable dependency injection.
Stars: ✭ 28 (+27.27%)
Mutual labels:  dependency-injection
dargo
Dependency Injection for GO
Stars: ✭ 26 (+18.18%)
Mutual labels:  dependency-injection
ComponentsManager
A service locator that makes work with Dagger2 in multi-module project easier. Allows binding components life to Activity/Fragment life-cycle.
Stars: ✭ 70 (+218.18%)
Mutual labels:  dependency-injection
swift-di-explorations
Functional DI explorations in Swift
Stars: ✭ 28 (+27.27%)
Mutual labels:  dependency-injection
sanic-ext
Extended Sanic functionality
Stars: ✭ 26 (+18.18%)
Mutual labels:  dependency-injection
di
Dependency Injection
Stars: ✭ 11 (-50%)
Mutual labels:  dependency-injection
vesselize
⛵ A JavaScript IoC container that works seamlessly with Vue.js and React.
Stars: ✭ 22 (+0%)
Mutual labels:  dependency-injection
jimple
Just a dependency injection container to NodeJS and to the browser using new ES6 features
Stars: ✭ 72 (+227.27%)
Mutual labels:  dependency-injection
Components.js
🧩 A semantic dependency injection framework
Stars: ✭ 34 (+54.55%)
Mutual labels:  dependency-injection
Tangle
Android injection using the Anvil compiler plugin
Stars: ✭ 65 (+195.45%)
Mutual labels:  dependency-injection
NoMansWallpaperApp
Looking for your next No Man's Sky wallpaper?
Stars: ✭ 35 (+59.09%)
Mutual labels:  dependency-injection
AnnotationInject
Compile-time Swift dependency injection annotations
Stars: ✭ 40 (+81.82%)
Mutual labels:  dependency-injection
zf-dependency-injection
Advanced dependency injection for laminas framework
Stars: ✭ 17 (-22.73%)
Mutual labels:  dependency-injection
ioc-ts
Inversion of control container on TypeScript
Stars: ✭ 14 (-36.36%)
Mutual labels:  dependency-injection
whook
Build strong and efficient REST web services.
Stars: ✭ 18 (-18.18%)
Mutual labels:  dependency-injection
AvengersChat
💙 Android sample Avengers chat application using Stream Chat SDK based on MVVM (ViewModel, Coroutines, Room, Hilt, Repository) architecture.
Stars: ✭ 350 (+1490.91%)
Mutual labels:  dependency-injection
kaop
Advanced OOP Library with createClass, inheritance, providers, injectors, advices which enables handy Inversion of Control techniques
Stars: ✭ 40 (+81.82%)
Mutual labels:  dependency-injection
android-clean-architecture
🚀🚀🚀 The boilerplate for Android using Kotlin & Clean architecture.
Stars: ✭ 21 (-4.55%)
Mutual labels:  dependency-injection
SteroidsDI
Advanced Dependency Injection to use every day.
Stars: ✭ 15 (-31.82%)
Mutual labels:  dependency-injection
Asp.net MVC5 DDD EF6 IoC
Asp.net C# MVC5, EF6, DDD, IoC
Stars: ✭ 14 (-36.36%)
Mutual labels:  dependency-injection

简介

  • 这是 Angualr 依赖注入的独立版本,初始版本逻辑为从 Angular 源码中提取出来,并修复了一些已知 bug
  • 使用方法与 Angular 的依赖注入完全一致

使用方法

  • Injector.create创建第一级依赖注入器
  • 声明为依赖注入类即为@Injectable装饰器

injection-js的不同

  • injection-js属于动态依赖注入,是 Angular5 之前使用的版本,Angular5 之后转为静态依赖注入
  • 理论上会比injection-js快一些(否则 Angular 也不会做替换...),但是没有做 Benchmark
  • 需要会使用typescript调用转换器进行转换,或者使用 webpack 的 ts-loader 传入转换器,或者其他转换工具支持 typescript 并且支持 typescript 的自定义转换器

    未来会提供各个打包工具的使用方法

  • 两者基本上可以互换(细节部分需要调整)

测试

  • 做了一部分的单元测试.保证大部分功能正常使用
  • 因为大部分代码本身就是从 Angular 中提取的,所以稳定性肯定也是有保证

模板

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].