Ionic2 + angular2 + new Date() issue

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

try

new window.Date()

1 Like

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!