I'm trying to import PapaParse and use it inside a controller. This is what i tried so far:
import Papa from 'papaparse';
//import 'papaparse'; (tried it like this also)
angular.module('app').constant('Papa', window.Papa);
I think this is the right way to do it, but window.Papa is already undefined. What am i doing wrong?
For me it works to import it this way in an Angular2 Component
import * as Papa from 'papaparse';
I just had to import papaparse before angular, now its working fine!
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