Last active
September 16, 2019 23:25
-
-
Save alexytiger/5738922cfbff252003ef4dcb489f2360 to your computer and use it in GitHub Desktop.
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.selectedPurchaseContract$ = this.store$.pipe( | |
| select(fromStore.getSelectedProduct), | |
| filter(product => !!product), | |
| tap(product => this.store$.dispatch(PurchaseContractActions.loadPurchaseContract({ address: product.contractAddress }))), | |
| // we switch from one observable to another | |
| switchMap(() => this.store$.select(fromStore.getSelectedPurchaseContract)), | |
| filter(contract => !!contract), | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment