Adding runtime components to angular application

264 views Asked by At

We are building an angular application which allows 3rd party components to be integrated. These components are not available as packages during the build process as we do not know the 3rd party components that can come. The contract between the main application and the 3rd party components are well defined. We can think this of Microsoft Teams built as an angular app and we allow many other widgets to be added from Marketplace.

Sure that the iFrame approach will work to integrate it, as long as there is a URL available where the component is hosted. Using angular, is it possible for us to integrate the component? ComponentFactoryResolver approach wouldn't work as these components are not available during the build. Let's say we have the module JavaScript of component available which is self independent (not dependent on any shared libraries that are outside that module script). Is it in anyway possible in Angular if we can dynamically load that script so that the components that are defined in that module is available?

Or is there a better way in which we can integrate with dynamic components (not available during the packaging) to an angular application without using iFrames?

0

There are 0 answers