Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

477
Vistas
How to run angular application running on single instance from different domains

I have deployed the angular application which is running fine in production with url

http://example.com/my-project

Now we have requirement where we want to run this application from different domain with extra subdomain like

http://exa1.com/**abc**/my-project

When we run the application from dns http://exa1.com/my-project, application runs fine.

But when we are including additional sub domain like abc in between dns and project name then scripts does not loads and start giving 404 not found error.

I tried appending this additional sub domain in base href in index.html like

<base href="/abc/">

Also I have tried

 <script type="text/javascript">
   
   var url = location.href; 
   
    let str=url;
    str=str.substring(0,str.indexOf("my-project"))+'/my-project';
    
    
    var base = document.createElement('base');

    base.href = str;
    document.getElementsByTagName('head')[0].appendChild(base);

    </script>

<base href="/">

But did not succeed.

Kindly guide me further to solve this.

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda