Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
getHero(id: number): Observable<Hero> {
// TODO: send the message _after_ fetching the hero
this.messageService.add(`HeroService: fetched hero id=${id}`);
return of(HEROES.find(hero => === id));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment