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

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

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