Replies: 1 comment
-
|
I didn’t use inject mainly to keep things simple. You can always inject the dependency via the constructor or use That said, I haven’t used Angular in about 6 years, so it’s possible there are some good modern use cases for inject that I’m not aware of. I would love to hear if you have any examples! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! As part of my investigation on DI libraries, I've had a look at redi's code and usability.
I like that you've kept constructor injection, and that you've not used metadata (it would have been an issue with ESBuild!), however a question came up: is not including a type-safe
inject<T>(DependencyIdentifier<T>)function - similar to what Angular offers now - an omission, or you purposely don't want to add it?Beta Was this translation helpful? Give feedback.
All reactions