SystemJS配置删除对index.js的检查

时间:2016-11-24 13:42:03

标签: angular systemjs

我使用以下SystemJS配置加载Angular2应用。当我在浏览器中加载应用程序时,我看到SystemJS正在将index.js文件添加到路径中。

错误:

pandas.formats.style.Styler

配置:

system.src.js:1051 GET http://localhost:5000/lib/@angular/platform-browser/bundles/platform-browser.umd.js/index.js 404 (Not Found)

如何配置SystemJS以便我可以加载以下文件:

期望:

加载<script> window.onload = () => { System.defaultJSExtensions = true; System.config({ map: { 'rxjs': "https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.7/rx.all.min.js", '@@angular/core': '../../lib/@@angular/core/bundles/core.umd.js', '@@angular/common': '../../lib@@angular/common/bundles/common.umd.js', '@@angular/compiler': '../../lib/@@angular/compiler/bundles/compiler.umd.js', '@@angular/platform-browser': '../../lib/@@angular/platform-browser/bundles/platform-browser.umd.js', '@@angular/platform-browser-dynamic': '../../lib/@@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', '@@angular/http': '../../lib/@@angular/http/bundles/http.umd.js', '@@angular/router': '../../lib/@@angular/router/bundles/router.umd.js', '@@angular/forms': '../../lib/@@angular/forms/bundles/forms.umd.js', 'angular2-in-memory-web-api': '../../lib/angular2-in-memory-web-api.js' } }); System.import("../app/app.module.js"); } </script>

0 个答案:

没有答案