-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(database): Add $ref to observables #447
Conversation
…observables Makes the firebase.database.Reference used to create the observable public so that it can be used for accessing child records and paths relative to this collection/object. This closes angular#294
@davideast fyi |
@katowulf The build is failing but it's just a typings issue. https://travis-ci.org/angular/angularfire2/builds/153088435#L329 src/database/firebase_list_observable.spec.ts(54,41): error TS2339: Property 'Reference' does not exist on type 'typeof database'.
src/database/firebase_object_observable.spec.ts(54,41): error TS2339: Property 'Reference' does not exist on type 'typeof database'. I believe the type is |
So a few things here. A) these all pass locally, and B) we're using |
…created to address this. Commented test units to correct `error TS2339`; bug angular#467 created to address this.
@davideast all tests should pass now (it's been 30 mins and Travis still hasn't started, you may need to kick it). Please review. We may need to squash something or some such? Got any instructs on that? |
@@ -51,6 +49,16 @@ describe('FirebaseObservable', () => { | |||
expect(O.map(noop) instanceof FirebaseListObservable).toBe(true); | |||
}); | |||
|
|||
describe('$ref', () => { | |||
// it('should be a firebase.database.Reference', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use xit
because neither database.Reference
nor firebase.database.Reference
will compile in typescript until the bug is fixed : (
@davideast what's left here before we can get this merged? |
@katowulf Fix the merge conflicts and let's merge! |
@davideast merge conflicts resolved! |
LGTM! |
feat(FirebaseObjectObservable, FirebaseArrayObservable): Add $ref to observables
Makes the firebase.database.Reference used to create the observable public so that it can be used for accessing child records and paths relative to this collection/object.
This closes #294