fileSaver not getting mapped for some reason. angular2-jwt is working fine.
I did npm install file-saver -save
to get file-saver then referenced it as follows (I have a gulp task to move the js file to libs directory and I see the file there)
in index.htmlI have included the script in src and system.config
<script src="libs/file-saver/FileSaver.js"></script>
<!-- 2. Configure SystemJS -->
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
} ,
map: {
"angular2-jwt": "libs/angular2-jwt/angular2-jwt.js"
,"fileSaver":"libs/file-saver/FileSaver.js"
}
});
System.import('app/bootstrap')
.then(null, console.error.bind(console));
</script>
component.ts
here it is not finding the fileSaver
import {SaveAs} from 'fileSaver';
the error I get is this
error TS2307: Cannot find module 'fileSaver'.
Any idea what's wrong here ?