如何在SharePoint 2013中部署Angular App [英] How to Deploy Angular App in SharePoint 2013

查看:96
本文介绍了如何在SharePoint 2013中部署Angular App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了角度项目(基本上是表单).如何部署该SharePoint 2013?

I have created angular project (Basically a form).How can I deploy that SharePoint 2013?

我已经尝试使用ng build命令来构建项目,但是它不起作用

I have tried building the project with the command ng build but it's not working

无法获得有关将角度应用程序部署到SharePoint的正确文章/答案.我没有在应用程序中使用任何SP服务,而是使用REST API

Couldn't get proper article/answer for deploying angular app to SharePoint. I have not used any SP services in the app instead used REST API

有人可以向我提供有关此信息吗?

Can someone provide me the information on this ?

推荐答案

示例演示使用AngularCLI来构建有角度的应用程序.

Sample demo to use AngularCLI to build angular app.

部署应用程序后,运行 npm run bundle 来构建应用程序.

After deploying app, run npm run bundle to build the app.

将dist文件复制到SharePoint

Copy the dist files to SharePoint

更新index.html使其品脱到这些js文件.

Update index.html to pints to these js files.

<body>
  <app-angular-demo-web-part description="Hello world!"></app-angular-demo-web-part>
<script src="/SiteAssets/AngularDemo/runtime.js"></script><script src="/SiteAssets/AngularDemo/polyfills-es5.js" nomodule></script><script src="/SiteAssets/AngularDemo/polyfills.js"></script><script src="/SiteAssets/AngularDemo/scripts.js"></script><script src="/SiteAssets/AngularDemo/main.js"></script></body>

在内容编辑器Webpart和结果中链接html文件.

Link the html file in content editor webpart and result.

引用该线程

这篇关于如何在SharePoint 2013中部署Angular App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆