Open
Description
If you add res['.ref'] = _getRef(snapshot)
to the createRecord function. Like:
function createRecord (snapshot) {
var value = snapshot.val()
var res = isObject(value)
? value
: { '.value': value }
res['.key'] = _getKey(snapshot)
res['.ref'] = _getRef(snapshot);
return res
}
Then we can more easily access the firebase reference that is associated with a given item. The example in the readme could be changed from:
deleteItem: function (item) {
this.$firebaseRefs.items.child(item['.key']).remove()
}
to:
deleteItem: function (item) {
item['.ref'].remove()
}