how to embed an angular app into another app?

前端 未结 3 1692
走了就别回头了
走了就别回头了 2020-12-02 11:49

My team develop an angular 5 application that has been in production for a while, but we\'ve been tasked recently with making the app work in other 3 sites the company owns.

3条回答
  •  被撕碎了的回忆
    2020-12-02 12:18

    I believe the Angular 6 Elements is going to be your only option for the non-angular apps. That is the only method that I am aware of that allows components to be executed outside of angular.

    In order to maintain your style encapsulation, you can use the css prefix:

    :host
    

    in your component's .css or .scss files.

    If you can get rid of the non-angular requirement, I would recommend the Angular CDK PortalHost and DomPortalHost.

提交回复
热议问题