I\'m learning angular2 and i wanted to use js-xlsx library in my project.
I installed xlsx npm install xlsx
and jszip npm install jszip
an
I installed the xlsx package, e.g. "npm install --save xlsx". It updated the package.json file with xlsx as a dependency. And now in my component I can import it, e.g. "import * as XLSX from 'xlsx' ". I'm using Angular 4. I guess, in Angular 2 it should work exactly the same way. P.S. There is no need to include the javascript file in the index.html.