I have a SPA with Angular CLI framework and a Javascript library written by a team member. I need to inject this JS file into the app. My thought is
- to write a type definition for the file;
- import both JS file and its type definitions (.d.ts) to the app
My question is how to add the custom type definition file into my Angular CLI app? (I know the JS file can be added from "scripts": []
in .angular-cli.json file, right?)
I saw some posts for adding external js library to angular-cli, but they all seem on npm which doesn't work for me apparently.