Well I am working with a project and using Angular 5.2.0 where I have done a ponent with their service and some modules. The pany that want this ponent prefer include the angular app like a Widget in their page.
I am trying some code like this stackoverflow and this option but I don't understand how they are doing this. I want to know another way or a better explain about this issue.
Can I package all my app in a only javascript to include in the HTML page?
Well I am working with a project and using Angular 5.2.0 where I have done a ponent with their service and some modules. The pany that want this ponent prefer include the angular app like a Widget in their page.
I am trying some code like this stackoverflow and this option but I don't understand how they are doing this. I want to know another way or a better explain about this issue.
Can I package all my app in a only javascript to include in the HTML page?
Share Improve this question asked Aug 22, 2019 at 14:28 Aprendiendo SiempreAprendiendo Siempre 3731 gold badge9 silver badges21 bronze badges2 Answers
Reset to default 5You need to create a custom Angular element and then use webponent polyfills (Still most browsers don't support web ponents natively) to load the angular element into any HTML page.
You can check the following URLs:
https://angular.io/guide/elements
https://blog.angulartraining./tutorial-how-to-create-custom-angular-elements-55aea29d80c5
Although I am not quite sure if it's supported in Angular 5. However Angular 6 does have support for custom elements.
The best solution I found it was use iframe tag in HTML. For example:
<iframe id="Example"
title="Example"
width="400"
height="400"
src="http://localhost/example">
</iframe>
Work fine. However, it's some slow. I hope help you.