- Made with Angular CLI version 12.2.2.
- Deployed at GitHub Pages with angular-cli-ghpages package.
- npm install -g angular-cli-ghpages.
- ng deploy --base-href=/
For more options/information visit the package documentation.
- Create the route 'assets/js/moduleHere.js'.
- Inidicate the module route in
angular.json
-> scripts:
"scripts": [
"src/assets/js/moduleHere.js"
]
- On the
.ts
file of the component:
declare const objectToImport:any;
- the name of the constant has to be equal to the module object.
If everything was done correctly, you can now make use of the imported object in the component.