Im trying to figure out how to properly work with the external js libraries for angular project. I'm using @angular/cli: 1.0.4 with angular version 4.1.3.
I have two libraries one of which was available in npm, and the other is not. Both include d.ts files in the same folder as js files.
For the first one I did: npm install mylib --save. Then in the .ts file where I was using this lib i placed this statement "import * as x from "libjs"".
The second one i placed in src/assets/js/ folder. And added the following import "import * as x from "../assets/js/lib"".
It seems to be working but I have two questions: 1. Why is it working without modyfing the scripts tag in the .angular-cli.json file? Do I have to explicitly add them there as well? What's the purpose? 2. Am I using it correctly and efficiently?