-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Enable connection to multiple database instances of the same project #1567
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
You should be able to do this with DI in the |
Hi @jamesdaniels, I've been needing to change to different databases into the same project. You mentioned Any help is highly appreciated. |
I found a workaround that works with current
|
@jamesdaniels I need to access data from both databases in the same component. How can I achieve that? Hmm. Can the injection token be defined per |
@swftvsn If @CarlosACabrera code is running, I wouldn't call it a workaround. |
Yeah @JanOschii, I need to experiment more, I've tried to solve this earlier, for context see #1240 |
There's the See here https://github.com/angular/angularfire2/blob/master/src/database/database.ts#L19 I'll work on docs for this. If you need multiple databases in the same component building the ref as @CarlosACabrera is the correct way to do this; you could also get fancy and make your own module for AngularFireDatabase to use both, but IMO not worth it unless you were referencing two separate Firebase applications in the same module. |
Hi @CarlosACabrera I've also tried to disable tslint but the param of I've tried it with @5.0.0-rc.10 and @5.0.0-rc.6.0 |
@texano00 , I have the same problem. Did you resolve this? Does anyone had the same problem? |
@texano00, @florent1933 You could fix it by adding
This is an issue with the |
Thanks for your answer @CarlosACabrera, it's very helpful. |
I would like to access multiple realtime databases within the same firebase app project.
As you can find in the documentation "Scale with Multiple Databases > Connect your app to multiple database instances":
Would be nice, to have this in angularfire2 too.
The text was updated successfully, but these errors were encountered: