EDIT: Don't add to your angular-cli.json files scriptscripts section. This is not needed!
You seem to have it right there, just to make sure, here are the steps with how i can reproduce it working on one of my projects:
- stop the current
ng serve - do
npm install lodash --saveandnpm install @types/lodash --save-dev - In the controler do your
import * as _ from 'lodash'; - Use it like this:
console.log(_.chunk(['a', 'b', 'c', 'd'], 2)); ng serveagain