ng-fad-privacy-notice-desktop
v2.0.0
Published
``` npm install ng-fad-privacy-notice-desktop ```
Downloads
3
Keywords
Readme
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
| Name | Type | Required | Default | Description | | ---------------- | ------- | -----------| ------------ | ------------------------------------------ | | configuration | object | false | {} | module data to be configured | | template | string | false | undefined | privacy notice template | | legend | object | false | undefined | legend confirmation of the privacy notice |
Outputs
| Name | Return | Description | | ----------------- | ------- | -------------------------------------------------------------- | | onerror | object | Is called when an error happens | | onaccept | void | Is 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
| Name | Type | Required | Default | Description | | ---------------- | ------- | -----------| ------------ | ------------------------------------------ | | configuration | object | false | {} | module data to be configured | | template | string | false | undefined | privacy notice template |
Outputs
| Name | Return | Description | | ----------------- | ------- | -------------------------------------------------------------- | | onerror | object | Is called when an error happens | | onclose | void | Is called when the user finishes the process |