ApplicationRef.isStable never goes to "true" when an instance of AngularFireAuth is injected
See original GitHub issueWhen AngularFireAuth
is injected anywhere on the page, the ApplicationRef.isStable
never emits true
. This causes problems with latest @angular/service-worker
, which relies on ApplicationRef.isStable
to install the worker. This probably also would cause server-side rendering to timeout, but I didn’t test this.
Version info
Angular: 5.0.0
Firebase: 4.6.2
AngularFire: 5.0.0-rc4
How to reproduce these conditions
Inject AngularFireAuth
into a component and subscribe to the ApplicationRef.isStable
observable:
import { Component, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
constructor(appRef: ApplicationRef, af: AngularFireAuth) {
appRef.isStable.subscribe(s => {
console.log(s);
});
}
}
Here is a project that reproduces the problem: https://stackblitz.com/edit/angularfire2-appref-isstable
Expected behavior
The ApplicationRef.isStable
observable should emit true
shortly after application is loaded.
Actual behavior
The ApplicationRef.isStable
observable emits only initial false
value.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:25 (10 by maintainers)
Top Results From Across the Web
Demystifying the ApplicationRef.IsStable event in Angular
IsStable event is a notifier. whenever an application goes from one state to another, it gives us an appropriate value: True=Stable , False=Unstable...
Read more >ApplicationRef - Angular
In this example, isStable will never emit true , and the trace "App is stable now" will never get logged. If you want...
Read more >ApplicationRef.isStable not executing - Stack Overflow
isStable never fires and, therefore, the second console.log never writes to the console. Am I doing this right, or am I missing something?...
Read more >Create Responsive, Fast and Reliable PWAs Using Angular
While the advice and information in this book are believed to be true and accurate at ... I am going to cover building...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The same issue when I injects
AngularFirestore
. We cannot use an@angular/service-worker
as it is not registered due to this issue.Any updates on this issue?