This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
How do I inject a class rather than an instance of a class? #21
Closed
Description
This is a simplified version of what I am trying to do:
export class Factory {
@Inject(MyClass)
constructor (MyClass) {
this.MyClass = MyClass;
}
create () {
return new this.MyClass();
}
}
export class MyClass {
...
}
Is there a way to get DI to pass a class rather than an instance of a class?
Metadata
Metadata
Assignees
Labels
No labels