- I have my Angular application that is hosted at www.A.com,
- My customer has a web site that is hosted at www.B.com
- I need to let my customer to insert the Angular app on his webpage without copying application files to his website. I want my customer to just add some HTML code that references the files from my original www.A.com website.
So, at some page www.B.com/somepage.html customer would put something like that:
<base href="https://www.A.com" />
<app-root></app-root>
<script src="runtime.469fa17746b90e8a757c.js" defer></script>
<script src="polyfills.35a5ca1855eb057f016a.js" defer></script>
<script src="scripts.3cf90f8fc92130239739.js" defer></script>
<script src="main.f229882672708596d13b.js" defer></script>
I tried this approach but encountered with a whole bunch of issues related to CORS and CORB.
Does anyone have a clear path on how a webpage can use Angular app from another domain?
EDIT NOTE 1: solution with iframe does not work for us because it negatively affects SEO (Google penalizes us for it), so we cannot use iframe with external link on our website.
EDIT NOTE 2: I have ownership of www.A.com (so I can adjust any configuration/HTTP headers required for my app to be used from external websites)