GithubHelp home page GithubHelp logo

enyo / angular_recaptcha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lejard-h/angular_recaptcha

0.0 3.0 0.0 26 KB

License: BSD 3-Clause "New" or "Revised" License

CSS 0.63% Dart 99.37%

angular_recaptcha's Introduction

Angular Recaptcha (Dart)

How to use

Add to pubspec.yaml

# If you are running angular `v5`
angular_recaptcha: ^0.1.1
# If you are still running angular `v4`
# angular_recaptcha: ^0.0.8
# If you are still running angular `v2` or `v3`,
# then you need to use: 
# angular_recaptcha: "0.0.6"` 

then

pub get

Add to index.html

Deprecated Adding the script tag is no more necessary

<script src="https://www.google.com/recaptcha/api.js?render=explicit"></script>

Use it

<angular-recaptcha [(ngModel)]="value" key="YOUR_KEY" auto-render></angular-recaptcha>

Options

Support ngModel for Form validation.

@Inputs

  • String size: Support "normal" or "compact"
  • String key: Your sitekey
  • String theme: Support "light" or "dark"
  • String type: Support "image" or "audio"
  • bool autoRender: will render the captchat automatically when ready
  • String tabindex

@Outputs

  • expire: notify when the token is expired, we also set value to null

Getter

  • value: get the value of the captcha

Functions

  • render(): manually render the captcha
  • reset(): manually reset the captcha

More documentations

More

import 'package:angular/angular.dart';
import 'package:angular_recaptcha/angular_recaptcha.dart';

@Component(
    selector: 'app',
    template: '''
        <angular-recaptcha [(ngModel)]="value" key="YOUR_KEY" [(ngModel)]="value" auto-render></angular-recaptcha>
        ''',
    directives: const [AngularRecaptcha, formDirectives ]
)
class AppComponent {
  String value;
}

angular_recaptcha's People

Contributors

enyo avatar hlejard avatar jodinathan avatar lejard-h avatar

Watchers

 avatar  avatar  avatar

angular_recaptcha's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.