I am using following to code read an object from firebase database using angularfire in my ionic app, but i want to let it wait for certain time if.. no data recieved or unable to connect, i want to throw error.
return this.db.object('/cmtoci')
.valueChanges()
I can see the error in google chrome console, but it appears around 15-20 seconds in case of no internet connection and resume the request when internet connection is back. Is it possible to wait for certain time (5 seconds), just throw error manually and do not make any more requests?
GET https://xxx.firebaseio.com/.lp?start=t&ser=221147393&cb=5&v=6 net::ERR_NAME_NOT_RESOLVED