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

289
Views
¿Cómo usar bibliotecas externas para AOT en angular2?
  • Entorno: Sistema operativo: Ubuntu 16.04, IDE: Atom

  • Versión angular: 2.3.1

  • Navegador: [ Chrome 57.0.2987.110 ]

  • Idioma: [Mecanografiado 2.1.6 | ES6 ]

  • Nodo (para problemas de AoT): nodo --versión =6.9.5

¿Cuándo se ejecutan realmente los scripts dentro de la etiqueta de scripts de angular-cli.json durante AOT?

En uno de mis componentes, he usado minified amazon s3 sdk. ('aws-sdk-2.23.0.min.js') En JIT, mi aplicación funciona bien cuando uso

 declare let AWS: any;

Pero en AOT produce el siguiente error:

 Cannot read property 'S3' of undefined TypeError: Cannot read property 'S3' of undefined.

angular-cli.json contiene lo siguiente:

 { ... "apps": [ { .... "scripts": [ "aws-sdk-2.23.0.min.js" ] } ] ... }
over 4 years ago · Santiago Trujillo
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!