Is there an easy way to inject an input binding into the deps array of a provider factory? Below obviously does not work.
const myServiceFactory = (object: any) => {
//...
};
@Component({
// ...
inputs: ['object'],
providers: [
{
provide: Object,
useValue: object,
},
{
provide: MyService,
useFactory: myServiceFactory,
deps: [Object]
}
]
})
As a possible solution you can try to do it something like this:
Plunker Example