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

109
Views
How to export standalone html/css with javascript from angular project?

I have an angular project with html's/CSS/component(.ts files)/service(.ts files). service methods are reading data from .json files in the assets folder(not calling backend).

I am doing a prod build which will generate html's/CSS/javascript files in dist folder.

The problem is generated index.html file is not rendering, displaying blank screen in browser without server(application server). My requirement is to make this HTML work offline.

how can I export standalone html's/CSS/javascripts to work as a offline html from angular project?

Generated dist folder structure: enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can do that using http-server package.

First install the package globally

npm install http-server -g

Then inside your project directory(in the terminal) just run

http-server dist/

And if you are using Angular 6+ or above (Working with Angular 10), You have to run

http-server dist/your-project-name

Now you can visit http://localhost:8080 to view your application

about 4 years ago · Juan Pablo Isaza Report
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!