Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Calling $save does not trigger a $watch event #368

Closed
katowulf opened this issue Jul 31, 2014 · 6 comments
Closed

Calling $save does not trigger a $watch event #368

katowulf opened this issue Jul 31, 2014 · 6 comments
Assignees
Milestone

Comments

@katowulf
Copy link
Contributor

When we call $save on a local object, we push the current value to the server. If a change occurs, then a child_changed event will be triggered. However, because the data will already be set locally, no change will occur, and therefore neither $FirebaseArray nor $FirebaseObject will trigger a $watch event after. Consider sending notifications for these?

@joshbowdoin
Copy link
Contributor

I would like to still get the notification. That way I can handle updates in other parts of the app the same way regardless of where the update came from (local or remote).

@jwngr jwngr added the bug label Jul 31, 2014
@katowulf
Copy link
Contributor Author

katowulf commented Aug 1, 2014

See also angular/angular.js#8325

@katowulf katowulf self-assigned this Aug 7, 2014
@louiswilbrink
Copy link

+1 for the notification. Until then, I'm using the promise returned by $save and calling the same function I specify for the $watch event. This seems a little repetitive, but I understand there is distinction between watching changes and watching when two locations are out of sync.

@spotlmnop
Copy link

So , this is fixed in 0.9.0 right?

@jwngr
Copy link

jwngr commented Dec 8, 2014

This has been fixed since version 0.8.1. See the last item in the 0.8.1 changelog.

@katowulf
Copy link
Contributor Author

katowulf commented May 9, 2016

@jaymanned please post your own issue, rather than replying to one closed 2 years ago.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants