-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 AngularFireAuth into the AppComponent.
- Create get method for a property. Log a message to console in the method.
- Refer the property in the template using {{}}
- View the application in chrome, observe console using developer tools
The 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.
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
https://embed.plnkr.co/S3cm7hpJImTtaTSa9Om0/
Steps to set up and reproduce
Create new Angular app. Add AngularFire2 and Firebase modules.
Sample data and security rules
None
None
Debug output
Please see attachment.
Expected behavior
The get method is called only once. The injected AngularFireAuth does not trigger ChangeDetection in Angular.
Actual behavior
The log message in the get method is printed continuously as if in a loop due to ChangeDetection being triggered.