Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Sharepoint上设置Angular 2入门教程应用程序_Sharepoint_Typescript_Angular - Fatal编程技术网

在Sharepoint上设置Angular 2入门教程应用程序

在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

我正在尝试将应用程序加载到Sharepoint网页中。看看Angular的入门实战Plunker示例

只需要3个文件:(忽略styles.css文件。)

  • index.html
  • app\maint.ts
  • app\app.components.ts
我在我的Web部件上添加了一个应用程序文件夹和这些相同的文件,但应用程序似乎没有加载。它找不到.ts(typescript)文件

如果我查看index.html页面,JS中会抛出一个错误: 错误:XHR错误(未找到404)加载 从中加载“/app.component”时出错 堆栈跟踪:

我已经创建了app文件夹,并在其下面创建了app.component.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));