@@ -21,6 +21,7 @@ export class FirebaseuiAngularLibraryComponent implements OnInit, OnDestroy {
2121
2222 @Output ( 'signInSuccessWithAuthResult' ) signInSuccessWithAuthResultCallback : EventEmitter < FirebaseUISignInSuccessWithAuthResult > = new EventEmitter ( ) ; // tslint:disable-line
2323 @Output ( 'signInFailure' ) signInFailureCallback : EventEmitter < FirebaseUISignInFailure > = new EventEmitter ( ) ; // tslint:disable-line
24+ @Output ( 'uiShown' ) uiShownCallback : EventEmitter < void > = new EventEmitter ( ) ; // tslint:disable-line
2425
2526 private subscription : Subscription ;
2627
@@ -84,8 +85,8 @@ export class FirebaseuiAngularLibraryComponent implements OnInit, OnDestroy {
8485 }
8586 }
8687
87- private getCallbacks ( ) : any {
88- const signInSuccessWithAuthResult = ( authResult : UserCredential , redirectUrl ) => {
88+ private getCallbacks ( ) : any { // firebaseui.Callbacks
89+ const signInSuccessWithAuthResultCallback = ( authResult : UserCredential , redirectUrl ) => {
8990 this . ngZone . run ( ( ) => {
9091 this . signInSuccessWithAuthResultCallback . emit ( {
9192 authResult,
@@ -105,9 +106,16 @@ export class FirebaseuiAngularLibraryComponent implements OnInit, OnDestroy {
105106 return Promise . reject ( ) ;
106107 } ;
107108
109+ const uiShownCallback = ( ) => {
110+ this . ngZone . run ( ( ) => {
111+ this . uiShownCallback . emit ( ) ;
112+ } ) ;
113+ } ;
114+
108115 return {
109- signInSuccessWithAuthResult : signInSuccessWithAuthResult ,
116+ signInSuccessWithAuthResult : signInSuccessWithAuthResultCallback ,
110117 signInFailure : signInFailureCallback ,
118+ uiShown : uiShownCallback
111119 } ;
112120 }
113121}
0 commit comments