Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!