相关疑难解决方法(0)

Firebase更新回调以检测错误和sucssess

如何使此回叫工作?我已阅读过这些文件,但由于某些原因我无法弄明白?

   var ref = new Firebase("https://xxx.firebaseio.com/public/"+$scope.uid+"/shows/");
var blast = ref.child(show_title);

blast.update({
"show_title": show_title,
"show_image": show_image,
"show_description": show_description,
"show_email": show_email,
"time": Firebase.ServerValue.TIMESTAMP
});

 blast.update("I'm writing data", function(error) {
   if (error) {
    alert("Data could not be saved." + error);
  } else {
    alert("Data saved successfully.");
  }
});
Run Code Online (Sandbox Code Playgroud)

firebase

10
推荐指数
2
解决办法
8586
查看次数

标签 统计

firebase ×1