2.0.0 • Published 2 years ago

ng-fad-privacy-notice-desktop v2.0.0

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

Getting started

Installation

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

Note: BrowserAnimationsModule is required.

Usage 1

HTML

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

  <ng-fad-privacy-notice-desktop-v1
    [configuration]="configuration"
    [template]="template"
    [legend]="legend"
    (onaccept)="onaccept()"
    (onerror)="onerror($event)">
  </ng-fad-privacy-notice-desktop-v1>

Typescript

Listen to the events and execute methods:

  public configuration = {};
  public template = null;
  public legend = null;

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

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

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
templatestringfalseundefinedprivacy notice template
legendobjectfalseundefinedlegend confirmation of the privacy notice

Outputs

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

Usage 2

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

  <ng-fad-privacy-notice-desktop-v2
    [configuration]="configuration"
    [template]="template"
    (onclose)="onclose()"
    (onerror)="onerror($event)">
  </ng-fad-privacy-notice-desktop-v2>
  public configuration = {};
  public template = null;

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

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

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
templatestringfalseundefinedprivacy notice template

Outputs

NameReturnDescription
onerrorobjectIs called when an error happens
onclosevoidIs called when the user finishes the process
2.0.0

2 years ago

1.1.0

2 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago