So here is my code, I do believe you can understand what I'm trying to accomplish with no additional explanations.
@Injectable()
export class Dispatcher {
}
@Injectable()
export class TodoStore {
constructor(@Inject(Dispatcher) private dispatcher:Dispatcher){
}
}
@Component({
...
providers:[TodoStore,Dispatcher]
}
export class MyComponent{
costructor(@Inject(TodoStore) private store:TodoStore) {}
}
I'm getting Uncaught Error: Can't resolve all parameters for TodoStore: (?). Any ideas, please
@Inject(Dispatcher) private dispatcher: Dispatcher? Wouldn't it be sufficient to just useprivate dispatcher: Dispatcherandprivate store: TodoStorein your constructors? - alex kucksdorfprivate store: TodoStoreand it works as well, but not resolving current issue - Lunin Roman