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

261
Vistas
Angular : unable to show static html pages when hosted into server but works fine when run in local

In my angular project, I have placed few static html files(sampleText.html in this case) in src/assets/html folder. and in one of my component im trying to fetch and show it. Im using below code to do it. It works perfectly fine when im running npm start and im able to see the html part in localhost as desired. but when i build the same and host using aws amplify and it says "Please enable JavaScript to continue using this application." here is the frontend code: ts file:

fetch(`../../assets/html/sampleText.html`).then(res => res.text()).then(data => {
  this.content =data;
})

in html im rendering as: <div [innerHTML]="content">

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