Reputation: 5550
I have a problem with AngularJS.
I have a working sample as this :
http://jsfiddle.net/IgorMinar/Hxbqd/5/
And I would like to modify it to directly call at my connectControl
function as this:
The only slight change between them is:
$scope.registerWithFacebook();
Why is not this one working? Or What I have to do make it work?
Thanks
Upvotes: 1
Views: 3697
Reputation: 5550
As Arun P Johny suggested there was error in my console.
The problem is that FB was not ready at changed statement. When I replaced it something like this
setTimeout(function(){$scope.registerWithFacebook()},3000);
It started to work.
Upvotes: 1