angular2 is returning lodash as an empty object.
npm install lodash --save
npm install @types/lodash --save
Imported as below :
import * as _ from "lodash";
_ is empty - what i'm doing wrong?
https://github.com/AngularClass/angular2-webpack-starter/issues/1302
With "lodash": "^4.17.3" on dependencies and "@types/lodash": "^4.14.40" on devDependencies of the package.json file I was able to do
import * as lodash from 'lodash';
Wish that helps!
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