@Mobius77 wrote:
I have installed moment and its typings into my ionic2 project:
typings install moment --ambient --save
In my page, I use the following to import syntax:
import * as moment from 'moment';
With this import syntax (as opposed to others) the moment functionality is working. However, Visual Code intellisense says it "cannot find 'moment'" and when doing an
ionic serve
get the following errors:ERROR in [default] C:/Users/Mark/Documents/App Development/MyApp/app/pages/ login/login.ts:4:24 Cannot find module 'moment'.
and
ERROR in [default] typings/browser/ambient/moment/index.d.ts:9:20 Cannot find namespace 'moment'.
If anyone has been able to get momentJS actually working (not just notionally following the procedures of other 3rd party package installs) in their TS ionic2 project without any intellisense or other associated errors can you please provide all the steps required (including their TSConfig.json set-up)?
Thanks in advance!
Posts: 4
Participants: 3