我不能得到通过boot.js文件时,我直接从运行:file:///C:/wamp/www/ngProject/index.html
或WAMP:http://localhost/ngproject/
Angular2无法加载boot.js
在发展它的工作原理与npm-start
模式,但它不应该工作与WAMP或只是通过运行Index.html?
这是我system.js
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
</script>
当从WAMP开始 - 错误:无法加载脚本http://localhost/app/boot.js错误加载http://localhost/app/boot.js
当开始的Index.html - 错误:无法加载脚本file:///app/boot.js 加载文件时出错:///app/boot.js
你有没有尝试检查控制台的错误..? – Outlooker
是的,我编辑了错误的帖子。 –