Created
February 19, 2018 15:12
-
-
Save vmasek/615c906f6621f2408bf97bbe89e52dd4 to your computer and use it in GitHub Desktop.
example service
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
@Injectable() | |
export class ProductsService { | |
private readonly stuff$ = new ReplaySubject<Stuff[]>(); | |
readonly stuff = this.stuff$.asObservable(); | |
constructor(private readonly fire: Fire) { | |
this.fire.getTheStuff().subscribe( | |
(stuff) => this.stuff$.next(stuff) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment