Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

346
Visualizações
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

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda