Closed
Description
When 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.
Metadata
Metadata
Assignees
Labels
No labels