Last active
June 18, 2019 13:58
-
-
Save Oleg-Sulzhenko/090df95239f692064e1e570249ba1227 to your computer and use it in GitHub Desktop.
https://stackoverflow.com/questions/52845192/rxjs-stop-propagation-of-observable-chain-if-certain-condition-is-met/52845452 почему subscribe in subscribe это плохо ??
каким оператором отмкнеть предыдущий API call ??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.service.getFileableSARs() | |
.mergeMap((res: any) => { | |
if (!(res.length === 0)) { | |
this.snackbar.error('There are no pending SAR Reports to file'); | |
this.snackbar.info('Redirecting to overview...'); | |
this.router.navigate([`/sars/batches`]); | |
} else { | |
return this.service.generateSARBatch(); | |
} | |
}) | |
.tap((res) => { | |
console.log('2 ', res); | |
return of(res); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment