1
我想將值推送到存儲在我的firebase數據庫中的嵌套數組。目標看起來是這樣的:在firebase中創建嵌套數組對象
我查詢數據庫火力和接收快照。有了這個快照,我想存儲我的更改。如果我把新的價值它火力創建我:
如何避免獨特的FB ID和一個正常的索引計數器更換呢?
我的代碼從角服務:
//Save StarBewertung on Mamis
this.saveStarOnMami = function (data) {
var ref = new Firebase("https://incandescent-heat-5149.firebaseio.com/contacts")
var query = ref.orderByChild("id").equalTo(data).on("child_added", function(snapshot) {
if(snapshot.val() === null) {
/* does not exist */
} else {
//snapshot.ref().update({"phone_fixed": '123'});
snapshot.ref().child('rateData').push(1);
}
});
}
有沒有辦法讓快照爲$ firebaseobject,操縱它,然後將它與$保存到火力地堡DB救?
謝謝...
是你當前的代碼的工作? – adolfosrs