1
在这里导入是我的html:System.import在角2总是试图从URL
<script src="/static/angular-scripts/vendors/test/es6-shim.js" type="text/javascript"></script>
<script src="/static/angular-scripts/vendors/test/angular2-polyfills.js" type="text/javascript"></script>
<script src="/static/angular-scripts/vendors/test/system.src.js" type="text/javascript"></script>
<script src="/static/angular-scripts/vendors/test/Rx.js" type="text/javascript"></script>
<script src="/static/angular-scripts/vendors/test/angular2.dev.js" type="text/javascript"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('angular/core')
.then(null, console.error.bind(console));
</script>
上面的代码将输出:
GET http://my_url/angular/core 500 (Internal Server Error)
你将如何配置SystemJS,这样它不” t从网址中直接找到路径,有没有一种方法来配置它?
我无法导入我的引导文件要么,我想测试我是否可以在所有输入任何东西。 – testing
我编辑了我的答案与src链接,因为我不知道你有正确的版本。如果你尝试,它会在下面的URL中查找该文件。例如,应用程序中的启动文件,** localhost:8080/yourPROJECTname/app/boot.ts ** – Nishanthd