Skip to content

Instantly share code, notes, and snippets.

@ssukhpinder
Created July 24, 2020 16:39
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 ssukhpinder/abae0fb7aa7ec748eb58f0fcb0592fc2 to your computer and use it in GitHub Desktop.
Save ssukhpinder/abae0fb7aa7ec748eb58f0fcb0592fc2 to your computer and use it in GitHub Desktop.
interval(1000) // run every 1 second
.pipe(
startWith(0),
switchMap(() => /* API or Function call */)
)
.subscribe(
res => {},
error=>{}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment