It's my first post on stackoverflow.
I'm trying to import a library developed by my society in an angular-cli project.
This is an angular-cli project (Angular v6) and the library is an Angular project build with webpack.
When I import the lib, I get a lot a errors.
My process :
- import the library in the package.json
- import some script (relative to my specific lib) in my angular.json file
"scripts": [
"node_modules/chart.js/dist/Chart.js",
"node_modules/hammerjs/hammer.min.js",
"node_modules/email-builder/dist/polyfills.bundle.007e569078d25408929d.js",
"node_modules/email-builder/dist/main.bundle.007e569078d25408929d.js"
]
When I compile my project, I receive this error : error
I tried to call lib methods like this :
_init() {
window['angularComponentRef'].zone.run(() => {
window['angularComponentRef'].component.initEmailBuilder();
});
}