Thursday, 30 March 2017

Using lodash with Angular2 and TypeScript

// command prompt
npm install --save lodash
npm install --save @types/lodash
// in your .ts file
import * as _ from 'lodash';

You can use the same approach for Express, body-parser, cors, morgan, etc.

The typings file are stored under the folder node_modules/@types

No comments:

Post a Comment