FirebaseExtended / angularfire

AngularJS bindings for Firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add loading indicator in signInWithPopup popup's background.

ofabricio opened this issue · comments

It would be nice a loading indicator in the signInWithPopup popup's background (while loading the content), because the blank background sometimes gives the impression it is freezed.

AngularFire doesn't concern itself with the UI of your app. You can accomplish this kind of thing yourself by doing something like this:

JavaScript

$scope.loading = true;
$scope.authObj.$signInWithPopup("google").then(function(result) {
  $scope.loading = false;
  console.log("Signed in as:", result.user.uid);
}).catch(function(error) {
  $scope.loading = false;
  console.error("Authentication failed:", error);
});

HTML

<div ng-if="loading">
   <!-- Show loading indicator -->
</div>

<div ng-if="!loading">
     <!-- Show loaded content -->
</div>

How, as it opens up a popup (new browser window) that has nothing to do with my app?

Take a look: https://s23.postimg.org/vguat027f/ilustration.png

It would be nice to setup the window's size too. The default one is so big.

Sorry, I misinterpreted what you were referring to. I've forwarded this feedback on to the auth team. Thanks for the feedback.