November 2017
Beginner to intermediate
288 pages
7h 33m
English
let miConnected = firebase.database().ref(".info/connected"); miConnected.on("value", function(res) { if (res.val() === true) { //TODO : show connection status as connected } else { //TODO : show connection status as disconected } });
The preceding code will simply test the connection to the server, and it depends on the value we're getting from the server; we handle the UI accordingly.
Read now
Unlock full access