Wednesday, 19 April 2017

How to control ng-recaptcha controls in angular like tough on bots Easy on humans

In Package.json file i am using ng-recaptcha.I need to control the ng-recaptcha controls like tough on bots Easy on humans.

"dependencies": {
    "@angular/animations": "^4.0.1",
    "@angular/common": "^4.0.1",
    "@angular/compiler": "^4.0.1",
    "@angular/core": "^4.0.1",
    "@angular/forms": "^4.0.1",
    "@angular/http": "^4.0.1",
    "@angular/platform-browser": "^4.0.1",
    "@angular/platform-browser-dynamic": "^4.0.1",
    "@angular/router": "^4.0.1",
    "ng-recaptcha": "^0.5.0",
    }

login.html

 <div>
    <re-captcha (resolved)="resolved($event)" [site_key]="siteKey" class="captcha"></re-captcha>
    </div>

login.component.ts

import { ViewChild } from '@angular/core';
 import { Router, RouterModule } from "@angular/router";

export class RegisterComponent {


      constructor(private route: Router,private service:loginservice){
      }
      capcha:any; 
        resolved(response: string) {

        }

    }

app.module.ts

  import { ReCaptchaModule } from 'ng-recaptcha';

    @NgModule({
      imports: [...,ReCaptchaModule.forRoot()]
      })



via Vignesh

No comments:

Post a Comment