In my angular app, I'm trying to import an external library Presto.js
. I have added the below code
angular.json
"scripts": [
"./src/assets/presto/Presto.js"
]
example.component.ts
import * as Presto from '../../assets/presto/Presto';
ngOnInit() {
debugger;
Presto.layout();
}
When it hits the debugger, I can see the method layout()
in it, but when the debug point it released, the below error is thrown
TypeError: _assets_presto_Presto__WEBPACK_IMPORTED_MODULE_6__["layout"] is not a function.
Does anyone have any idea on this..