I have followed the Tutorial. After changing app/maint.ts
in the Http chapter I get the error when starting the app via command line:
ap
For me just doing an install from angular-tour-of-heroes directory works for me
C:\nodejs\angular-tour-of-heroes>npm install angular-in-memory-web-api --save
Try adding the typescript definitions:
sudo typings install --save file:./node_modules/angular2-in-memory-web-api/in-memory-backend.service.d.ts
... specifying the dependency name:
angular2-in-memory-web-api
Then add the entry point for "angular2-in-memory-web-api" in /systemjs.config.js
var packages = {
...
'angular2-in-memory-web-api': { main: 'core.js', defaultExtension: 'js' }
};
From your root folder (the folder contain package.json), using:
npm install angular-in-memory-web-api –-save
For users who generated an empty project with angular cli 1.4.9 (Actual on October 2017) and then started follow the instructions step-by-step, just run the following command:
npm i angular-in-memory-web-api
Just that command, without anything additional.
Hope that saves someone's time
Latest fix as of this date, is to
"angular-in-memory-web-api": "0.0.20"
to "angular-in-memory-web-api": "0.1.0"
and "zone.js": "^0.6.23"
to "zone.js": "^0.6.25"
'angular-in-memory-web-api': {
main: 'index.js',
defaultExtension: 'js'
}