Reputation: 419
I am developing image zoom in angular4 library,I need to import openseadragon js file to my library.
If it is angular project then simply i can add cdn to index.html, but in library how can i import js file.
I tried with the angular-cli.json file in the below way, but it didn't worked.
"scripts": [
"../node_modules/openseadragon/build/openseadragon/openseadragon.min.js"
]
Any solutions will be appreciated..
Upvotes: 3
Views: 1351
Reputation: 5978
Try to do the following (and skip any step you already did)
1. Add "openseadragon": "2.3.0" to the package.json.
2. Use npm install.
3. Write in your ts file : import * as dragon from 'openseadragon';
4. Profit :)
Upvotes: 4