tuto_angular/angular-tour-of-heroes/src/app/hero.service.ts

17 lines
307 B
TypeScript
Raw Normal View History

2019-10-25 13:36:01 +00:00
import { Injectable } from '@angular/core';
import { Hero } from './hero';
import { HEROES } from './mock-heroes';
import { Observable, of } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class HeroService {
constructor() { }
getHeroes(): Observable<Hero[]> {
return of(HEROES);
}
}