如何在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.