I am trying to work through the Angular2 tour of heroes app, and am running into bugs on the Http section of the tutorial.
At first I was getting the error:
For Angular5 tutorial and angular-in-memory-web-api@0.5.3:
Add new file "in-memory-data.service.ts" to your root directory with this contents:
import { InMemoryDbService } from 'angular-in-memory-web-api';
export class InMemoryDataService implements InMemoryDbService {
createDb() {
let heroes = [
{ id: 1, name: 'Windstorm' },
{ id: 2, name: 'Bombasto' },
{ id: 3, name: 'Magneta' },
{ id: 4, name: 'Tornado' }
];
return { heroes };
}
}