我正在尝试在Visual Studio 2015中使用ASPNET 5设置angular2 rc4。目前我遇到此错误,我不确定问题是什么。我一直在努力让这种方式正常运行。
这是我的systemjs.config.js
(function (global) {
// map tells the System loader where to look for things
var map = {
'app': 'app', // 'dist',
'@angular': 'js/@angular',
'ng2-dnd': 'js/ng2-dnd',
'rxjs': 'js/rxjs',
'angular2-in-memory-web-api': 'js/angular2-in-memory-web-api',
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
'app': { main: 'main.js', defaultExtension: 'js' },
'@angular': { defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
'ng2-dnd': { defaultExtension: 'js' },
};
var packageNames = [
'common',
'compiler',
'core', // <--------
'http',
'platform-browser',
'platform-browser-dynamic',
'router',
'router-deprecated',
'testing',
'upgrade',
];
// Individual files (~300 requests):
function packIndex(pkgName) {
packages['@angular/' + pkgName] = { main: 'index.js', defaultExtension: 'js' };
}
// Bundled (~40 requests):
function packUmd(pkgName) {
packages['@angular/' + pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}
// Most environments should use UMD; some (Karma) need the individual index files
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
packageNames.forEach(setPackageConfig);
var config = {
map: map,
packages: packages
}
System.config(config);
})(this);