My Angular app is set to be deployed on two different sites with the same code base. I have configured the base tag for site A like this:
<base href="https://A.com/">
However, for the second site (site B), I need to use a different base tag:
<base href="https://B.com/">
Since the repository is the same, I am wondering if there is a way to achieve this dynamic base tag configuration?
I attempted using:
<base href="/">
But this approach causes problems when reloading the app in nested states. For example, when the URL is , the app tries to fetch resources from the /x/y/z path instead of the root directory.
Is there any solution to ensure that resources are always fetched from the root?
Thank you in advance for your help.