Created
August 21, 2019 22:47
-
-
Save timjonesdev/5d2149be4d023292bb86de5196e238f0 to your computer and use it in GitHub Desktop.
The constructor for the TeamService
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
private teamWatchSource = new BehaviorSubject(new TeamModel()); | |
_teamWatchSource: Observable<TeamModel> = this.teamWatchSource.asObservable(); | |
constructor(private http: HttpClient, private zone: NgZone) { | |
this.getTeamsStream().subscribe(data => { | |
this.teamWatchSource.next(new TeamModel().deserialize(data)); | |
}, error => console.log('Error: ' + error), | |
() => console.log('done loading team stream')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment