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

156
Visualizações
Loading external scripts defined in index.html only after angular app is done loading

Current Scenario: I've around 20+ & tags in my index.html file, which are actually interfering with the other scripts and assets being loaded by angular, leading to a not-so-good user experience.

Desired Behavior: I need these external scripts to be loaded only after all the angular assets and files used on the homepage are loaded.

index.html

<html>
<head>
 //meta & link tags
</head>
<body>
   <app-root></app-root>
   // Here I've the script tags with defer like one below
   <script defer src="https://www.googletagmanager.com/gtag/js?id=DC-10365329"></script>
</body>
</html>

I tried using defer but after build, angular is appending the bundle files at the end in the body. So, the problem remains the same. Snapshot of the network tab

Is there any way I can have all the bundle files loaded and executed first?

Thanks

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