-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
When I do this
key$ = this._activatedRoute.params.pluck('key');
item$: FirebaseObjectObservable<Client> = this.key$.switchMap(
(key) => this._db.object(`/client/${key}`)
);item$ is not gonna be FirebaseObjectObservable anymore, it's gonna be a AnonymousSubject, without any of the Firebase methods (set() etc.).
It was supposedly fixed by #162 / #321 but it still seems to be broken.
I've seen people on SO using list() and query instead of switchMap, but that doesn't seem right, what would be the point of obervable firebase wrapper if you couldn't use observable chains. But maybe I'm just doing something wrong, don't know. But if it's the case, I think it might be worth adding this usecase (id/key from angular' route param) to the docs, unless I'm blind and it's already there.
Related questions / issues:
- https://groups.google.com/forum/#!topic/firebase-talk/LvHtohssYIE (unaswered)
- bug(observables): Firebase Observable Subclasses used in SwitchMap #196 (closed)
Version info
Angular: 4.1.3
Firebase: 4.0.0
AngularFire: 4.0.0.rc-1
rxjs: 5.4.0
cc @davideast
luillyfe
Metadata
Metadata
Assignees
Labels
No labels