After the response, I want to call angular function from outside js and it seems so surprise to me as this function throws an error
function _i(){
FB.api('/me', function(response) {
angular.element(document.getElementById('vikas_facebook')).scope().connectWithFacebook(response);
});
}
AngularJs Function
$scope.connectWithFacebook = function (response) {
// Saving response data in our database
}
I have used this function many times and it worked perfectly but in fb.api It throws an error. PFA regarding this
document.getElementById('vikas_facebook')
element exist when you are trying to getscope
– Satpal 48 mins ago