2.0.1 • Published 2 years ago

ng-fad-privacy-notice v2.0.1

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

Getting started

Installation

npm install ng-fad-privacy-notice

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

Note: BrowserAnimationsModule is required.

Usage 1

HTML

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

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

Typescript

Listen to the events and execute methods:

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

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

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
privacyNoticeHtmlstringfalseundefinedprivacy notice template
legendstringfalseundefinedlegend confirmation of the privacy notice
delaynumbrefalse2000loader duration

Outputs

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

Usage 2

HTML

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

  <ng-fad-privacy-notice-v2
    [configuration]="configuration"
    [privacyNoticeHtml]="privacyNoticeHtml"
    [delay]="delay"
    (onclose)="onclose()"
    (onerror)="onerror($event)">
  </ng-fad-privacy-notice-v2>

Typescript

Listen to the events and execute methods:

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

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

Inputs

NameTypeRequiredDefaultDescription
configurationobjectfalse{}module data to be configured
privacyNoticeHtmlstringfalseundefinedprivacy notice template
delaynumbrefalse2000loader duration

Outputs

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

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago