Service Virtualization

  • 1.  How to use external libraries for AOT in angular2?

    Posted Sep 10, 2018 04:32 AM
    • Environment: Operating system: Ubuntu 16.04 , IDE: Atom

    • Angular version: 2.3.1

    • Browser: [ Chrome 57.0.2987.110 ]

    • Language: [ TypeScript 2.1.6 | ES6 ]

    • Node (for AoT issues): node --version =6.9.5

    At the point when do the contents inside contents tag of precise cli.json really get executed amid AOT ?

    In one of my segments, I have utilized minified amazon s3 sdk. ('aws-sdk-2.23.0.min.js') In JIT, my application is working fine when I utilize AWS Certified

     

    declare let AWS: any;

    But in AOT it produces following error:

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

    angular-cli.json contains following:

    {   ...    "apps": [     {      ....       "scripts": [          "aws-sdk-2.23.0.min.js"       ]           }   ]   ... }


  • 2.  Re: How to use external libraries for AOT in angular2?

    Broadcom Employee
    Posted Sep 10, 2018 09:01 PM

    Hi,

     

    You created this discussion in DevTest(CA Application Test, CA Service Virtualization...) community.
    However, the information in your description does not include any of DevTest related information.
    Could you please give us the suitable CA product name for this discussion?
    And if it is DevTest, could you please give us the version of DevTest?

     

    Thank you,