Created
December 12, 2019 17:03
-
-
Save ndcunningham/e6c06662dbb2cac051443acf833202f3 to your computer and use it in GitHub Desktop.
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
pay$ = defer(() => fromEvent(button, 'click')).pipe( | |
mergeMap(() => this.payService.pay() | |
// This will make the above fire multiple times regardless if there is one currently running | |
); | |
ngOnInit() { | |
this.pay$.subscribe() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment