简体   繁体   English

将Angular2组件导出为独立小部件

[英]Export Angular2 Component as standalone widget

Is there a way to export Angular2 Component as a standalone widget? 有没有一种方法可以将Angular2组件导出为独立的小部件? I am aware it would probably require attaching angular2 core itself, that is not a problem (unless can be omitted). 我知道这可能需要附加angular2核心本身,这不是问题(除非可以省略)。

My aim is to create a full app (system), which includes a shared component (like a product specific photo gallery). 我的目标是创建一个完整的应用程序(系统),其中包含一个共享组件(例如特定于产品的照相馆)。 I would like that component to be exportable so somebody can include that on their page (which doesn't have to be Angular2). 我希望该组件是可导出的,以便有人可以在其页面上包括该组件(不必是Angular2)。

Is that possible? 那可能吗?

当我问原始问题时,该功能不可用,但是现在可以使用Angular Elements将Angular Components导出为自定义元素: https : //angular.io/guide/elements

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM