我遵循了教程.在app/maint.ts
Http章节中更改后,我通过命令行启动应用程序时出错:
app/main.ts(5,51):错误TS2307:找不到模块'angular2-in-memory-web-api'.
(Visual Studio Code在main.ts中给出了同样的错误 - 红色波浪下划线.)
这是我的systemjs.config.js
:
/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function(global) {
// map tells the System loader where to look for things
var map = {
'app': 'app', // 'dist',
'@angular': 'node_modules/@angular',
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
'rxjs': 'node_modules/rxjs'
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
'app': { …
Run Code Online (Sandbox Code Playgroud)