I have FooService and BarService both are exposed actions functions:
And I want to get them in one variable (with typescript support, of course):
actions = { ...inject(FooService), ...inject(BarService) };
ngOnInit() {
this.actions.getFoo();
this.actions.getBar();
}
This works.
But is there a better way to do that without using the spread operator? I mean something like this?
actions = injectMany(FooService, BarService) and injectMany do the same results.
Is something like this possible to do?