Last active
February 19, 2020 00:58
-
-
Save alexytiger/05d2dd382d2695e4e973013c9b27712e to your computer and use it in GitHub Desktop.
e-book
This file contains 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
reload$ = createEffect( | |
() => | |
this.actions$.pipe( | |
ofType( | |
PurchaseContractActions.abortSelectedPurchaseContractSuccess, | |
PurchaseContractActions.confirmBuySuccess, | |
PurchaseContractActions.confirmDeliverySuccess, | |
PurchaseContractActions.releaseEscrowSuccess, | |
PurchaseContractActions.withdrawByOwnerSuccess), | |
withLatestFrom( | |
this.store$.pipe(select(fromStore.getSelectedPurchaseContract))), | |
tap(async ([action, contract]) => { | |
// we need to reload on the same route | |
// based on https://github.com/angular/angular/issues/13831 | |
this.router.routeReuseStrategy.shouldReuseRoute = ( ) => false; | |
this.router.navigate(['/market-place/products', contract.productKey]); | |
}) | |
), | |
{ dispatch: false } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment