1.0.2 • Published 2 years ago

ng-fad-acceptance-signature-express v1.0.2

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

Getting started

Installation

npm install ng-fad-acceptance-signature-express

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 { NgFadAcceptanceSignatureExpressModule } from 'ng-fad-acceptance-signature-express';
.
.
.
... imports: [
       ...,
       BrowserAnimationsModule 
       NgFadAcceptanceSignatureExpressModule
    ]...

Note: BrowserAnimationsModule is required.

Usage

HTML

Add the selector inside some component and configure the input parameters:

  <ng-fad-acceptance-signature-express
    [configuration]="configuration"
    [pdfSrc]="pdfSrc"
    [positionSignatures]="positionSignatures"
    (onerror)="onerror($event)"
    (onsigndocument)="onsigndocument()">
  </ng-fad-acceptance-signature-express>

Typescript

Listen to the events and execute methods:

  public configuration = {};
  public onsigndocument = [];
  public pdfSrc = 'pdf resource';

  onerror(error) {
    alert(JSON.stringify(error));
  }

  onsigndocument() {
    alert('next step');
  }

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
pdfSrcstringtrueundefinedpdf resource
positionSignaturesobjecttrueundefinedsignature coordinates

Outputs

NameReturnDescription
onerrorobjectIs called when an error happens
oncontinuevoidIs called when the user finishes the process