1.0.0 • Published 2 years ago

ng-fad-acceptance-signature-express-desktop v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Getting started

Installation

npm install ng-fad-acceptance-signature-express-desktop

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 { NgFadAcceptanceSignatureDesktopModule } from 'ng-fad-acceptance-signature-express-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-express-desktop
    [configuration]="configuration"
    [pdfSrc]="pdfSrc"
    [signatures]="signatures"
    [moreInformation]="moreInformation"
    (onerror)="onerror($event)"
    (oncontinue)="oncontinue()"
    (onmoreinformation)="onmoreinformation()">
  </ng-fad-acceptance-signature-express-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

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
pdfSrcstringtrueundefinedpdf resource
signaturesobjecttrueundefinedsignature coordinates
moreInformationbooleanfalsefalseview to see more information text

Outputs

NameReturnDescription
onerrorobjectIs called when an error happens
oncontinuevoidIs called when the user finishes the process
onmoreinformationvoidIs called when the user clicks on the text of more information