@trustcaptcha/trustcaptcha-angular
Version:
Trustcaptcha library for angular
64 lines (38 loc) • 1.68 kB
Markdown
# Trustcaptcha Angular-Library
The Angular library helps you to integrate Trustcaptcha into your Angular frontend applications.
## What is Trustcaptcha?
A captcha solution that protects you from bot attacks and puts a special focus on user experience and data protection.
You can find more information on your website: [www.trustcaptcha.com](https://www.trustcaptcha.com).
## How does the library work?
Detailed instructions and examples for using the library can be found in our [documentation](https://docs.trustcaptcha.com/en/documentation/frontend/integration?frontend=angular).
## Short example
Here you can see a short code example of a possible integration. Please refer to our provided [documentation](https://docs.trustcaptcha.com/en/documentation/frontend/integration?frontend=angular) for complete and up-to-date integration instructions.
1. Installing the library
``npm i @trustcaptcha/trustcaptcha-angular``
2. Add the TrustcaptchaModule to your app.module.ts
```
import {TrustcaptchaModule} from "@trustcaptcha/trustcaptcha-angular";
@NgModule({
...
imports: [
...
TrustcaptchaModule
],
...
})
export class AppModule { }
```
3. Use the Trustcaptcha component in any form element
```
<form>
<!-- your input fields -->
<trustcaptcha-component
sitekey="cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a"
(captchaSolved)="handleSuccess($event.detail)"
(captchaFailed)="handleError($event.detail)"
></trustcaptcha-component>
<!-- further input fields / submit button -->
</form>
```
## Ideas and support
If you have any ideas, suggestions, or need support, please [contact us](https://www.trustcaptcha.com/en/contact-us).