Answer: How to use moment.js library in angular 2 typescript app?

ikungolf

Theerachai Songsee

Posted on January 15, 2020

Answer: How to use moment.js library in angular 2 typescript app?

Update April 2017:

As of version 2.13.0, Moment includes a typescript definition file. https://momentjs.com/docs/#/use-it/typescript/

Just install it with npm, in your console type

npm install --save moment

And then in your Angular app, import is as easy as this:

import * as moment from 'moment';

That's it, you get full…

💖 💪 🙅 🚩
ikungolf
Theerachai Songsee

Posted on January 15, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related