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

190
Visualizações
How to add external js bundle in angular module

I have hello.js file with a function HelloWorld()

Angular app has lazy loaded modules module1, module2, .. moduleN

in Angular.json

 "scripts": [
              {
                "input": "src/alljs/hello.js",
                "inject": false,
                "bundleName": "lazyhello"
              },

This generates a bundle lazyhello.js in the root dir

I want to call function helloWorld() in module2 and module 3. So in module2.module.ts and module3.module2.ts I import it as -

import "../lazyhello.js"

However, it does not work. How can I import bundle lazyhello.js into the other lazy loaded angular modules?

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