I found some explanations about connecting multiple databases from separate app projects with angularfire2. But I would like to access databases within the same project.
The documentation stated:
// Get the default database instance for an app
var database = firebase.database();
// Get a secondary database instance by URL
var database = firebase.database('https://testapp-1234.firebaseio.com');
How can I do this with angularfire2?
I know you got a working answer here : https://github.com/angular/angularfire2/issues/1567
tested with : "angularfire2": "^5.0.0-rc.6.0", "firebase": "^4.12.1"
I've built a minimalist wrapper inspired of the #1567 I'd like to share. There are 2 methods with different or same project to use multiple databases.
You'll probably use the first one, I don't really understand the point of using multiple databases within multiple project.
Copy-Paste, inject it as you usually do with your custom services and then :