在Sharepoint上设置Angular 2入门教程应用程序
我正在尝试将应用程序加载到Sharepoint网页中。看看Angular的入门实战Plunker示例 只需要3个文件:(忽略styles.css文件。)在Sharepoint上设置Angular 2入门教程应用程序,sharepoint,typescript,angular,Sharepoint,Typescript,Angular,我正在尝试将应用程序加载到Sharepoint网页中。看看Angular的入门实战Plunker示例 只需要3个文件:(忽略styles.css文件。) index.html app\maint.ts app\app.components.ts 我在我的Web部件上添加了一个应用程序文件夹和这些相同的文件,但应用程序似乎没有加载。它找不到.ts(typescript)文件 如果我查看index.html页面,JS中会抛出一个错误: 错误:XHR错误(未找到404)加载 从中加载“/app.c
- index.html
- app\maint.ts
- app\app.components.ts
有什么想法吗?我已尝试上载Typescript生成的*.js.map和*.js文件。但是运气不好。看来我走错了路。如果像这样在system.config中指定了.JS文件,那么您只需要运行应用程序所需的.JS文件。(服务器上不需要TypeScript文件。)
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));