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