-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Proposal: New observable properties #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I like this and it aligns better with other modules in Angular like reactive forms One thing I'm not clear on... will the |
The I'm thinking we can port your operators over from RxFire to do the unwrapping (#1820). What do you think? |
Ah, that makes more sense. I think that's a reasonable way to go. The alternative would another prop like |
@codediodeio const col = afs.collection(‘items’, { includeMetadataChanges: false }, { id: 'id' });
col.data.subscribe(items => {
const first = items[0];
console.log(first.id);
}); What do you think? |
any updates on this? |
Guys why do you close the issues on a feature request that was never delivered? |
any update on this sir? |
Can we please get a fix for this? |
A related suggestion for this feature: in the meantime, if there is any hesitation because this is an API change, edit the code to ensure that (for example) .snapshotChanges() returns the same observable each time and not a new one. (It might already do this correctly, in which case, perhaps this API change might simply be abandoned as unnecessary.) |
@davideast any update on this sir? |
Is it already implemented? Is it possible to use includeMetadataChanges now? |
metadata changes are always included in snapshotChanges as of |
Properties not methods!
We’re thinking about introducing a new properties on the
AngularFireCollection
andAngularFireDocument
classes.This helps avoid the sticky situation of loops. If you create an observable as a function inside a loop each render creates multiple observables with multiple subscriptions. If each observable has a different query criteria it will act unpredictably.
Using a propery ensures that it’s only one instance of the observable, eliminating the unpredictable situations.
We'll also add this for documents.
Leave a comment and let us know what you think of this proposal.
The text was updated successfully, but these errors were encountered: