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
If using angular cli to build your angular2 app, including the angular2-in-memory-web-api involves three steps:
add the api to the system-config.ts file (inside the src subdirectory) like below:
/** Map relative paths to URLs. */
const map: any = {
'angular2-in-memory-web-api': 'vendor/angular2-in-memory-web-api'
};
/** User packages configuration. */
const packages: any = {
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' }
};
Add
angular2-in-memory-web-api/**/*.+(js|js.map)'
to the vendorNpmFiles array in the angular-cli-build.js file like ofShard mentioned;
Of course, add to the package.json as described by traneHead; for 2.0.0-rc.3 I use the version below:
"angular2-in-memory-web-api": "0.0.13"
I find this link "Adding material2 to your project" explains the process of adding third-party libraries quite clearly.