Using momentjs plugins with Ionic 2


I’m trying to use in my Ionic 2 app but I’m not sure how to include it. I have tried:



import * as range from 'moment-range';

and neither of these methods work. Could someone tell me how it can be achieved or is it not possible?

Thanks for any help.

Turns out it was very simple and all I need was:

import 'moment-range';

Typescript just isn’t happy with this:

Error TS2339: Property 'range' does not exist on type 'Moment'.

1 Like

Got some help on StackOverflow in the end and fixed the issue

1 Like