Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { Team } from './team';
const TEAMS: Team[] = [
{id: 1, name: 'FC Barcelona', coach: 'Ernesto Valverde'},
{id: 2, name: 'Toulouse FC', coach: 'Pascal Dupraz'},
{id: 3, name: 'PSG', coach: 'Unaï Emery'}
];
export class TeamService {
constructor() {
}
getTeams(): Observable<Team[]> {
return of(TEAMS);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.