angularjs - Detect closing facebook login popup by "X" button -


i'm using great module angularjs based app. question how detect if user clicked on red "x" close button on facebook login popup? event needs me in order remove "waiting" loader screen.

just add response argument inside .then() function.

if response.status == 'unknown' user has clicked cancel.

e.g.

$scope.login = function() {     $facebook.login().then(function(response) {       console.log(response);       if (response.status == 'unknown') {         console.log('cancelled');       }       refresh();     });   }; 

plunkr link.

hope helps.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -