I have 2 Observables number$ and text$. I want to subscribe to both simultaneously and get their values in an inner subscription.
My code now looks like this:
number$.subscribe((nr: number) => {
text$.subscribe((txt: string) => {
this.foo(nr, txt);
});
});
Is there any way to combine these two so i only need one subscription? I know about forkJoin (which probably would work perfectly fine here), but it's deprecated and we don't want to use deprecated functions.
Thanks in advance!