InversifyJS
InversifyJS copied to clipboard
How to inject method parameter
How to inject method parameter
@inject()
Class Name {
doSomething(
@inject() test: string
) {
console.log(string);
}
This question appears to be out of context. The primary role of a DI (Dependency Injection) container is to inject dependencies into a constructor rather than injecting parameters into arbitrary functions. It is highly likely that you're attempting to achieve a goal that this library was not designed for.