1.3.0 • Published 2 years ago

ng-fad-document-preview-desktop v1.3.0

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

Getting started

Installation

npm install ng-fad-document-preview-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 { NgFadDocumentPreviewDesktopModule } from 'ng-fad-document-preview-desktop';
.
.
.
... imports: [
       ...,
       BrowserAnimationsModule 
       NgFadDocumentPreviewDesktopModule
    ]...

Note: BrowserAnimationsModule is required.

Usage

HTML

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

  <ng-fad-document-preview-desktop
    [configuration]="configuration"
    [pdfSrc]="pdfSrc"
    [status]="status"
    [showDocumentRejection]="showDocumentRejection"
    (onerror)="onerror($event)"
    (onreject)="onreject()"
    (oncontinue)="oncontinue()">
  </ng-fad-document-preview-desktop>

Typescript

Listen to the events and execute methods:

  public pdfSrc = 'pdf resource';
  public status = 'REJECTED' | 'PENDING' | 'TO_SIGN';
  public showDocumentRejection = true;
  
  onerror(error) {
    alert(JSON.stringify(error));
  }

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

  onmoreject() {
    alert('reject document clicked')
  }

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
pdfSrcstringtrueundefinedpdf resource
statusstringtrueundefineddocument status
showDocumentRejectionbooleanfalseundefinedview to see document rejection text

Outputs

NameReturnDescription
onerrorobjectIs called when an error happens
oncontinuevoidIs called when the user finishes the process
onrejectvoidIs called when the user clicks on the text of reject document
1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago