I'm trying to trigger a callback when all my observables are executed. In my other, older project i used finally
like so and that worked like a charm:
this.myService.callDummy()
.finally(() => console.log('Works!'))
.subscribe(result => ...)
But now I'm using a newer version of RxJS with Pipeable operators, but the finally
call (now renamed to finalize
) never gets executed. There is little information to be found and I'm not sure what I'm doing wrong.
combineLatest(
this.route.queryParams,
this.myService.callDummy1(),
this.myService.callDummy2()
)
.pipe(finalize(() => console.log('Does not work!')))
.subscribe(results => ...);
Any help is appreciated.