iam trying to implement a download button in my Angular 2 application. I have used these tutorials: http://alferov.github.io/angular-file-saver/ https://coryrylan.com/blog/angular-2-cli-adding-third-party-libraries
So i installed file-saver by: npm install angular-file-saver
But import FileSaver from 'file-saver'; or import FileSaver from 'angular-file-saver'; doesnt work.
Error: Cannot find module 'file-saver'.
How do i get this working?
Thank you
http://alferov.github.io/angular-file-saver/ is a AngularJS service so it won't work for Angular2.
Refer to the one of the many SO questions already answered
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With