This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Adding support for Firebase events and $off / $unbind methods.#202
Closed
elkorn wants to merge 5 commits intoFirebaseExtended:masterfrom
Closed
Adding support for Firebase events and $off / $unbind methods.#202elkorn wants to merge 5 commits intoFirebaseExtended:masterfrom
elkorn wants to merge 5 commits intoFirebaseExtended:masterfrom
Conversation
Contributor
|
Lovely! Can I buy you a couple of 🍻 - or a non-alcoholic beverage of choice? 😄 |
Contributor
|
I'm going to make a couple of tweaks to this PR but it mostly looks good! I'll be removing the $unbind method (the names implies it's the opposite of $bind, which it is not), and rolling that functionality into calling $off without a callback argument. |
Contributor
|
Committed in 7c8c92d |
Contributor
Author
|
Glad to be of help. 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cheers!
While creating a collaborative app in AngularJS I had naturally decided to use AngularFire, since it's awesome. :)
However, I have soon found out that
changeandloadedevents are not enough for me, especially that they have not provided thesnapshotandprevChilddata for handlers.The pull request consists of precisely this functionality, plus
$off(type, handler)(unbinding a specific handler from an event) and$unbind(type)(unbinding all handlers from an event).The test suite passes BUT I have not added any new tests (I'm 'testing' the events continuously on my app, so did not have the need) - I can do that if it's a necessity- but at a later moment, I'm currently under considerable time pressure.
Hope you find this PR of value. :)