angular-cn/public/docs/_examples/hierarchical-dependency-inj.../ts/app/heroes.service.ts

13 lines
235 B
TypeScript

import {Hero} from './hero';
export class HeroesService {
heroes: Array<Hero> = [
{ name: "RubberMan", power: 'flexibility'},
{ name: "Tornado", power: 'Weather changer'}
];
getHeroes () {
return this.heroes;
}
}