Angular2 Plugin Mechanism

回眸只為那壹抹淺笑 提交于 2020-01-24 00:39:06

问题


I created a new Angular2 project with angular-cli. I wrapped it into Electron to use it as a desktop application. The app is more or less a simple window with a navbar and a plus sign in the middle. Clicking the plus should allow importing 'Plugins' to enrich the application. Plugins are complete Angular2 Projects itself, coming with their own package.json and dependencies. They could be packaged with webpack if necessary. Is there a way/approach to do this?

Thanks


回答1:


you can refer the @Gijs code

https://github.com/PacktPublishing/Mastering-Angular-2-Components/tree/master/angular-2-components-chapter-10

and also can bundle the app by using webpack (https://angular.io/docs/ts/latest/guide/webpack.html#!#top) or gulp(https://www.codeproject.com/Articles/1115444/Developing-And-Deploying-An-Angular-Application-Wi).



来源:https://stackoverflow.com/questions/43063091/angular2-plugin-mechanism

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!