【发布时间】:2016-11-05 11:44:04
【问题描述】:
我们可以在 firebase 对象中使用 $save 而不是 $add 来添加数据吗?
【问题讨论】:
标签: angularjs firebase angularfire firebase-realtime-database
我们可以在 firebase 对象中使用 $save 而不是 $add 来添加数据吗?
【问题讨论】:
标签: angularjs firebase angularfire firebase-realtime-database
AngularFire 的文档暗示$save 不能用于进行修改,例如$add 或$remove。
$save(recordOrIndex)
数组本身无法修改,但数组中的记录可以更新并单独保存回数据库。此方法将现有的、已修改的本地记录保存回数据库。它接受数组索引或对数组中存在的项的引用。
【讨论】: