You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While injecting via constructor is great, there is a problem when base classing or trying to use in generic functions to construct a result.
馃敠 Context
Ctor is getting messy when injecting lots of parameters, hard to get an instance from the container in a generic function, and not having to call super with the parent injections would be beneficial for lib auths.
I think we need to mention where we have seen this approach and express thanks to their ideas/exploration. Particularly Angular and Vue.
Personally, I think this is not bad, and works well with native class field to avoid having to have constructor as well. One point of discussion could be the function call to inject. Should it be a separate export or a property on the inject export itself:
While this idea is very old they helped flush out the use cases and make it more standard. :) You can see community contribution for au1 here (deco based which is an option to combine with a func) https://github.com/devaur/aurelia-property-injection
bigopon
added
the
RFC
Request For Comment - Potential enhancement that needs discussion and/or requires experimentation
label
Apr 17, 2023
馃挰 RFC
While injecting via constructor is great, there is a problem when base classing or trying to use in generic functions to construct a result.
馃敠 Context
Ctor is getting messy when injecting lots of parameters, hard to get an instance from the container in a generic function, and not having to call super with the parent injections would be beneficial for lib auths.
馃捇 Examples
@zewa666 @bigopon
The text was updated successfully, but these errors were encountered: