I am trying to call onclick function when i login through gmail,i wrote 2 functions below on which when i login through gmail it gets back to this controller but refreshing 2 times because of that my storage is getting empty and unable to open modal.Can anyone please help me.Thanks.
$scope.onClick = function(data) {
if(storage.getItem('isSupportClicked')) {
$('#alert').modal('show');
storage.remove('isClicked');
} else {
storage.setItem('isClicked', true);
}
};
supportAfterLogin();
function supportAfterLogin() {
if(storage.getItem('onClick')) {
$scope.onClick();
}
}