ltackmann / dice

Lightweight dependency injection framework for Dart
Other
34 stars 7 forks source link

Change syntax from @Named() @inject to just @Inject(name: name). #19

Closed llamadonica closed 6 years ago

llamadonica commented 9 years ago

Pros:

ltackmann commented 9 years ago

Hi Adam, thanks for your pull request. I am not sure I like this change, mainly because Google has an official Inject package https://pub.dartlang.org/packages/inject which exposes the @inject annotation. Thus for Dart to support container independent injection it would be best if Dice and the DI package supported this annotation.

I have another bug https://github.com/ltackmann/dice/issues/12 regarding the inject package which i hope to eventually get around to.

ltackmann commented 6 years ago

Sticking with the current setup, as it also follows the Injectable of Angular a bit better. Still would be nice for a common set of annotations for this