Ionic 3 timeout function?

With ionic 1 there was $timeout but can’t find if this work with ionic 3? I want to hide ion-footer content after 5 seconds in my ionic 3 app. What are possible ways ?

1 Like

Fairly simple:

let TIME_IN_MS = 5000;
let hideFooterTimeout = setTimeout( () => {
     // somecode
}, TIME_IN_MS);
5 Likes

setTimeout does not work on a cordova platform. At least, that’s not working for me on an iOS emulator. That just works on a browser because is a window method. You don’t have the window object on a cordova platform (Android, iOS, etc)

Yes it does. Something else is happening in your situation.

You’re right. It was some other thing I can’t remember now. I’m using setTimeout in other cases and it works. My bad