1.4.0 • Published 4 years ago
ng-fad-acceptance-signature-desktop v1.4.0
Getting started
Installation
npm install ng-fad-acceptance-signature-desktopDependencies
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 { NgFadAcceptanceSignatureDesktopModule } from 'ng-fad-acceptance-signature-desktop';
.
.
.
... imports: [
...,
BrowserAnimationsModule
NgFadAcceptanceSignatureDesktopModule
]...Note: BrowserAnimationsModule is required.
Usage
HTML
Add the selector inside some component and configure the input parameters:
<ng-fad-acceptance-signature-desktop
[configuration]="configuration"
[pdfSrc]="pdfSrc"
[signatures]="signatures"
[moreInformation]="moreInformation"
(onerror)="onerror($event)"
(oncontinue)="oncontinue()"
(onmoreinformation)="onmoreinformation()">
</ng-fad-acceptance-signature-desktop>Typescript
Listen to the events and execute methods:
public pdfSrc = 'pdf resource';
public moreInformation = false;
onerror(error) {
alert(JSON.stringify(error));
}
oncontinue() {
alert('next step');
}
onmoreinformation() {
alert('more information clicked')
}Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| configuration | object | false | {} | module data to be configured |
| pdfSrc | string | true | undefined | pdf resource |
| signatures | object | true | undefined | signature coordinates |
| moreInformation | boolean | false | false | view to see more information text |
Outputs
| Name | Return | Description |
|---|---|---|
| onerror | object | Is called when an error happens |
| oncontinue | void | Is called when the user finishes the process |
| onmoreinformation | void | Is called when the user clicks on the text of more information |