Created
March 20, 2020 15:07
-
-
Save NyaGarcia/4ba1abeee1793fd5fe8153e4e43e3bc0 to your computer and use it in GitHub Desktop.
Exposing subjects to the outside world
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
class DataService { | |
pokemonLevel$ = new BehaviorSubject<number>(1); | |
stop$: Subject<void> = new Subject(); | |
number$ = interval(1000).pipe(takeUntil(this.stop$)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment