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

189
Views
Cómo agregar un paquete js externo en el módulo angular

Tengo un archivo hello.js con una función HelloWorld()

La aplicación Angular tiene módulos con carga diferida module1, module2, .. moduleN

en Angular.json

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

Esto genera un paquete lazyhello.js en el directorio raíz

Quiero llamar a la función helloWorld() en el módulo 2 y el módulo 3. Así que en module2.module.ts y module3.module2.ts lo importo como -

importar "../lazyhello.js"

Sin embargo, no funciona. ¿Cómo puedo importar el paquete lazyhello.js a los otros módulos angulares con carga diferida?

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!