{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angularfire2/issues/1305","repository_url":"https://api.github.com/repos/angular/angularfire2","labels_url":"https://api.github.com/repos/angular/angularfire2/issues/1305/labels{/name}","comments_url":"https://api.github.com/repos/angular/angularfire2/issues/1305/comments","events_url":"https://api.github.com/repos/angular/angularfire2/issues/1305/events","html_url":"https://github.com/angular/angularfire2/issues/1305","id":267908972,"node_id":"MDU6SXNzdWUyNjc5MDg5NzI=","number":1305,"title":"Document properly how to use multiple Firebase projects in one app","user":{"login":"swftvsn","id":25097010,"node_id":"MDQ6VXNlcjI1MDk3MDEw","avatar_url":"https://avatars2.githubusercontent.com/u/25097010?v=4","gravatar_id":"","url":"https://api.github.com/users/swftvsn","html_url":"https://github.com/swftvsn","followers_url":"https://api.github.com/users/swftvsn/followers","following_url":"https://api.github.com/users/swftvsn/following{/other_user}","gists_url":"https://api.github.com/users/swftvsn/gists{/gist_id}","starred_url":"https://api.github.com/users/swftvsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swftvsn/subscriptions","organizations_url":"https://api.github.com/users/swftvsn/orgs","repos_url":"https://api.github.com/users/swftvsn/repos","events_url":"https://api.github.com/users/swftvsn/events{/privacy}","received_events_url":"https://api.github.com/users/swftvsn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-10-24T06:11:34Z","updated_at":"2018-09-12T16:00:00Z","closed_at":"2018-05-04T20:54:52Z","author_association":"NONE","body":"There's a lenghty discussion about this in #1240, and one stackblitz example how to do it, thanks for that!\r\n\r\nThe comments keep piling, so it seems this is still a source of frustration to people.\r\n\r\nThe documentation should include examples how to...\r\n\r\n- Configure 2 or more projects (for an example projects a, b and c)\r\n- inject realtime database or firestore pointing to project b to Angular **component**\r\n- inject realtime database or firestore pointing to project c to Angular **service** (annotated with `@Injectable()`)\r\n- inject two instances of realtime database or firestore pointing to project b **and** c configuration to Angular **component**\r\n- inject two instances of realtime database or firestore pointing to project b **and** c configuration to Angular **service** (annotated with `@Injectable()`)\r\n\r\nSo, essentially how to inject like this:\r\n```\r\nimport { Injectable } from '@angular/core'\r\nimport { AngularFireDatabase } from 'angularfire2/database'\r\n\r\n@Injectable()\r\nexport class MyService {\r\n\r\n  constructor(\r\n    private storeAppDb: AngularFireDatabase,\r\n    private invoicingAppDb: AngularFireDatabase\r\n  ) {\r\n  }\r\n\r\n}\r\n```\r\n\r\nI don't think Angular supports injection scheme like that, but a blueprint how to achieve the same would be nice. (If I can choose which one to inject, then I can make two wrapper services, that I can inject..)\r\n\r\nIt would be nice though to be just able to say:\r\n```\r\nimport { Injectable } from '@angular/core'\r\n\r\n@Injectable()\r\nexport class MyService {\r\n\r\n  constructor(\r\n    private angularfire: AngularFire\r\n  ) {\r\n    const firestore1 = angularfire.firestore('conf1')\r\n    const firestore2 = angularfire.firestore('conf2')\r\n  }\r\n\r\n}\r\n```\r\nwhich would return the angularfireified firestore etc. services.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angularfire2/issues/comments/420702929","html_url":"https://github.com/angular/angularfire2/issues/1305#issuecomment-420702929","issue_url":"https://api.github.com/repos/angular/angularfire2/issues/1305","id":420702929,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDcwMjkyOQ==","user":{"login":"newmesiss","id":5264883,"node_id":"MDQ6VXNlcjUyNjQ4ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/5264883?v=4","gravatar_id":"","url":"https://api.github.com/users/newmesiss","html_url":"https://github.com/newmesiss","followers_url":"https://api.github.com/users/newmesiss/followers","following_url":"https://api.github.com/users/newmesiss/following{/other_user}","gists_url":"https://api.github.com/users/newmesiss/gists{/gist_id}","starred_url":"https://api.github.com/users/newmesiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newmesiss/subscriptions","organizations_url":"https://api.github.com/users/newmesiss/orgs","repos_url":"https://api.github.com/users/newmesiss/repos","events_url":"https://api.github.com/users/newmesiss/events{/privacy}","received_events_url":"https://api.github.com/users/newmesiss/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T16:00:00Z","updated_at":"2018-09-12T16:00:00Z","author_association":"NONE","body":"@fbayanati this works well, I implemented it in my project and it goes well, but how do I integrate the session start of the second database?"}}
{"actor":{"display_login":"newmesiss"}}