Title: Injecting AngularFireAuth to component triggers ChangeDetection continuously · Issue #1544 · angular/angularfire · GitHub
Open Graph Title: Injecting AngularFireAuth to component triggers ChangeDetection continuously · Issue #1544 · angular/angularfire
X Title: Injecting AngularFireAuth to component triggers ChangeDetection continuously · Issue #1544 · angular/angularfire
Description: Version info Angular: 5.2.0 Firebase: 4.12.1 AngularFire: 5.0.0-rc.6 Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows 10, Google Chrome 65,npm: '5.6.0', node: '8.9.1' How to reproduce these conditions Inject AngularFi...
Open Graph Description: Version info Angular: 5.2.0 Firebase: 4.12.1 AngularFire: 5.0.0-rc.6 Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows 10, Google Chrome 65,npm: '5.6.0', node: '8.9.1' How to rep...
X Description: Version info Angular: 5.2.0 Firebase: 4.12.1 AngularFire: 5.0.0-rc.6 Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows 10, Google Chrome 65,npm: '5.6.0', node: '8.9.1...
Opengraph URL: https://github.com/angular/angularfire/issues/1544
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Injecting AngularFireAuth to component triggers ChangeDetection continuously","articleBody":"### Version info\r\n\r\n**Angular:** 5.2.0\r\n\r\n**Firebase:** 4.12.1 \r\n\r\n**AngularFire:** 5.0.0-rc.6 \r\n\r\n**Other (e.g. Ionic/Cordova, Node, browser, operating system):** Windows 10, Google Chrome 65,npm: '5.6.0', node: '8.9.1'\r\n\r\n### How to reproduce these conditions\r\n\r\n1. Inject AngularFireAuth into the AppComponent.\r\n2. Create get method for a property. Log a message to console in the method.\r\n3. Refer the property in the template using {{}}\r\n3. View the application in chrome, observe console using developer tools\r\n\r\nThe log message in the get method is printed continuously as if in a loop. This behavior disappears if the constructor injection of AngularFireAuth is removed.\r\n\r\n**Failing test unit, Plunkr, or JSFiddle demonstrating the problem**\r\n\r\nhttps://embed.plnkr.co/S3cm7hpJImTtaTSa9Om0/\r\n\r\n\r\n\r\n**Steps to set up and reproduce**\r\nCreate new Angular app. Add AngularFire2 and Firebase modules.\r\n\r\n**Sample data and security rules**\r\nNone\r\n\r\nNone\r\n### Debug output\r\n\r\nPlease see attachment.\r\n\r\n### Expected behavior\r\nThe get method is called only once. The injected AngularFireAuth does not trigger ChangeDetection in Angular.\r\n\r\n\r\n### Actual behavior\r\nThe log message in the get method is printed continuously as if in a loop due to ChangeDetection being triggered.\r\n\r\n[localhost-1522757258645.log](https://github.com/angular/angularfire2/files/1871402/localhost-1522757258645.log)\r\n\r\n\r\n","author":{"url":"https://github.com/tomsgit","@type":"Person","name":"tomsgit"},"datePublished":"2018-04-03T12:15:01Z","url":"https://github.com/angular/angularfire/issues/1544"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:85abe3f0-1fbc-33dc-f43b-1b9642ccf581 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8226:17DCE6:21972E1:2C7D5F3:6B036017 |
| html-safe-nonce | 66b7ebb2030ae3b6aca8a4fb7d45affd2e4f4013f97850a4963d67e057f71a7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjI2OjE3RENFNjoyMTk3MkUxOjJDN0Q1RjM6NkIwMzYwMTciLCJ2aXNpdG9yX2lkIjoiMTMwNDg4NjAyOTY1Nzk0ODM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c49a7ff75681ebc0b4a3acf8c136d8be09bdec8ec5cdf0cb014410f3ed10f782 |
| hovercard-subject-tag | issue:310811424 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/1544/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7486dd9bb4ec7fe21e3de2192dfdf4c1e3cc53b36b4d8de3037993398a5cdc0a/angular/angularfire/issues/1544 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7486dd9bb4ec7fe21e3de2192dfdf4c1e3cc53b36b4d8de3037993398a5cdc0a/angular/angularfire/issues/1544 |
| og:image:alt | Version info Angular: 5.2.0 Firebase: 4.12.1 AngularFire: 5.0.0-rc.6 Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows 10, Google Chrome 65,npm: '5.6.0', node: '8.9.1' How to rep... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tomsgit |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width