There is an angular wrapper for this, but if like me, you want to use the original JavaScript library this is how to do it :
The data-callback expect a java-script global function, so using a function inside a $scope will not work.. the solution i came up with is to create a global function that inherit the angular function.
so you should do :
$scope.login = function (token) {
// your login logic
}
$window.login = $scope.login;
and dont forget to inject $window as a dependency in your scope.
The google invisible reCaptcha will send you a token so you can verify the user serverside.
and in your html :
<button class="g-recaptcha"
data-sitekey="your_google_key_here"
data-callback="login"
data-size>
Login
</button>
hope this helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…