Can't figure out how to subscribe to the desired method of an Angular service depending on the conditional statement
// this.someService.someMethod depending on the conditional statement
.pipe(takeUntil(this.unsubscribe$))
.subscribe((items) => {
this.someData = items;
});
You could do following, if there might be different services to use:
or only saving method name if there is only one service to use. Also it depends on what is more readable to you.