Ionic 3 timeout function?


#1

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 ?


How to auto refresh data in ionic 3 and angular 4?
#2

Fairly simple:

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

#3

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)


#4

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


#5

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