Ward Bell 4253378e66 docs(hierarchical-di): Correct avoidance example (#3086) and more (#3091)
* closes #3086
* samples reworked to conform to our sample style, make more sense, and cover the points in prose.
* copy edits to bring closer to Google docs standards.
2017-01-13 13:21:22 -08:00

18 lines
361 B
TypeScript

import { Injectable } from '@angular/core';
import { of } from 'rxjs/observable/of';
export interface Villain { id: number; name: string; }
@Injectable()
export class VillainsService {
villains: Villain[] = [
{ id: 1, name: 'Dr. Evil'},
{ id: 2, name: 'Moriarty'}
];
getVillains() {
return of(this.villains);
}
}