-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Version info
Angular:
4.1.3
Firebase:
4.3.0
AngularFire:
4.0.0-rc.2
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
Current docs for Saving Data do not clarify that non-destructive behavior for update() only applies to values under the key level:
- https://github.com/angular/angularfire2/blob/master/docs/2-retrieving-data-as-objects.md#saving-data
Steps to set up and reproduce
Sample data and security rules
<-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) -->
Debug output
** Errors in the JavaScript console **
** Output from firebase.database().enableLogging(true); **
** Screenshots **
Expected behavior
That the docs be updated slightly to reflect the implementation details of updating with objects regarding destructive vs non-destructive.
Actual behavior
Because this detail is currently not provided, users tend to think all properties nested within objects being updated should be non-destructive. This leads to unexpected behavior and confusion.