Ionic2 + angular2 + new Date() issue


#1

When previewing my app in chrome - adding a new Date() object works just fine, however when I load it in the emulator on the device using ionic view - i just get a blank white screen and that app just hangs. Any ideas?

Cheers,
S


#2

try

new window.Date()


#3

Interesting that works! Thank you!

However I get typescript issue:
ERROR Property ‘Date’ does not exist on type ‘Window’.

right now I have
date: Date;
this.date = new window.Date();

But this only half the problem - Angular2 date pipe causes the app to not load as well haha. So I either need to find a way to filter that date on my own - or I dont know what to do.

Anyways thanks again!