class Foo {
constructor(dep1) {
}
}
Foo.$inject = ['Dependency1']
I know you can do DI like this in angular /w es6 classes. However, I need to also pass something into my constructor for foo (a config object). This is eluding me because from my knowledge, the DI parameters go first.
Essentially, I want to do
let foo = new Foo(config); //config defined above
But still have the benefits of the injectable dependencies in the class.
Solution 1:
Solution 2: