Monday 5 October 2020

Angular - How to import a module from a JS bundle

I am trying to import a module from a generated Angular library bundle located inside a vendor subfolder under src/.

index.html

<head>
...
    <script type="text/javascript" charset="utf-8" src="./vendor/example/bundles/example.umd.js"></script>
    
</head>

Nevertheless, I am having some troubles importing module from this in my app.module.ts. Please, any idea of how to do it?

It seems that @angular/core and @angular/common peerDependencies of angular library should also be bundled inside script to work correctly.

I will appreciate any kind of help



from Angular - How to import a module from a JS bundle

No comments:

Post a Comment