You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the presence of the $id property in the snapshot value, using AngularJS 1.3.0-beta13. Reverting to 1.3.0-beta10, the snapshot contains only the dictionary of the reference.
$firebase(myRef).$on("loaded", function (value) {
// value contains $id with angular 1.3 beta 13, but not with beta 10.
});
Usually I convert the dictionary in array using angular.forEach and the presence of that property "breaks" the loop.
angular.forEach(cart, function (item) {
if (item !== "cart") { // workaround for $id === "cart"
myCart.push(item);
total += item.qty * item.price;
}
});
I don't know if it is a glitch in angularFire or in AngularJS and how I should handle my use case.
The text was updated successfully, but these errors were encountered:
With the following stack
I noticed the presence of the
$id
property in the snapshot value, using AngularJS1.3.0-beta13
. Reverting to1.3.0-beta10
, the snapshot contains only the dictionary of the reference.Usually I convert the dictionary in array using
angular.forEach
and the presence of that property "breaks" the loop.I don't know if it is a glitch in angularFire or in AngularJS and how I should handle my use case.
The text was updated successfully, but these errors were encountered: