即時通訊使用firebase和由於某種原因,我的代碼是不推動數據,即時通訊沒有看到firebase網址中的數據。我的代碼是這樣的firebase不保存數據
var chatref = new Firebase('https://flockedin.firebaseio.com/');
chatref.push({ ChatId: $('#conversationId').text(), User: $('#username').html(), Message: $('#txtchat').val() }, function (response) { if (response) { alert('saved'); } });
我得到'保存'的警報,但我無法找到firebase網址中的數據。
此外,Firebase中的每個網址都有API Key的用途。
更新:這發生在IE10中。在其他瀏覽器中,它工作正常
目前我在Firebase中的該位置看到1234號碼。也許你用一個數字覆蓋你推送的數據,這就是爲什麼它沒有出現? 也試圖做一個console.log()你將要推動的數據,以確保它是你所期望的。 –
這是我添加的手動數據 –
好的。似乎它在IE中不起作用。在Chrome中它像魅力一樣工作 –