Skip to content

Instantly share code, notes, and snippets.

@ndcunningham
Created December 12, 2019 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndcunningham/e6c06662dbb2cac051443acf833202f3 to your computer and use it in GitHub Desktop.
Save ndcunningham/e6c06662dbb2cac051443acf833202f3 to your computer and use it in GitHub Desktop.
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