ng-fad-signature-desktop
v1.3.0
Published
## Installation
Downloads
9
Keywords
Readme
Getting started
Installation
npm install ng-fad-signature
Dependencies
Add the folder provided by the technical team within the project assets (images and js)
Import
In the file necessary example.module.ts import the module.
In this case app.module.ts
import { NgFadSignatureModule } from 'ng-fad-signature';
.
.
.
... imports: [
...,
BrowserAnimationsModule
NgFadSignatureModule
]...
Note: BrowserAnimationsModule is required.
Usage
HTML
Add the selector inside some component and configure the output events:
<ng-fad-signature
(onerror)="onerror($event)"
(onclose)="onclose()"
(oncomplete)="oncomplete($event)">
</ng-fad-signature>
Typescript
Listen to the events:
.
.
.
interface Response {
videoFace: Blob;
videoSignature: Blob;
imageSignature: string;
signatureData: SignatureData;
}
.
.
.
oncomplete(response: Response) {
// response
}
onclose() {
// user close screen
}
onerror($event) {
// some error
alert(JSON.stringify(error));
}
Outputs
| Name | Return | Description | | ----------- | ------- | -------------------------------------- | | oncomplete | object | Fires when recording ends successfully | | onclose | void | Is called when press close icon (x) | | onerror | object | Is called when an error happens |