0.20.4 • Published 5 years ago

@signatu/consent-angularjs v0.20.4

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

AngularJS components for Signatu Consent

This library contains AngularJS (aka Angular version 1)client components for Signatu Consent. It depends on the Signatu service, and the library interacts with signatu.com.

Installation

npm

npm install @signatu/consent-angularjs

Usage

The library contains the following components:

  • consent-buttons: consent request component using buttons.
  • consent-checkbox: consent request component using checkbox.
  • data-processing-consent: consent component for data processing specification data - e.g., from a Privacy Policy generated with Signatu.
  • policy-consent-dashboard: consent component to generate a dashboard of all (or subset) of consent targets in a signatu Privacy Policy.

Properties

ES6

import angular from 'angular'

import ConsentModule from '@signatu/consent-angularjs'

angular.module('myApp', [ConsentModule.name])
    .controller('myCtrl', function($scope) {
        $scope.consentConfig = {
            apiKey: 'MY_API_KEY', 
            accessToken: 'MY_ACCESS_TOKEN'
        };
        $scope.title = "Privacy Dashboard";
        $scope.subtitle = "Read our Privacy Policy";
        $scope.subject = MY_SUBJECT_ID;

        $scope.handleConsentEvent = function(event) {
            console.log("Got new consent event: ", event)
        }
    })
})

Now you can use the components in your HTML:

    <policy-consent-dashboard
        config="consentConfig"
        title="title"
        subtitle="subtitle"
        subject="subject"
        policy-url="'https://signatu.com/api/v0/policies/118'"
        element-ids="['4.2', '4.3']"
        on-consent="handleConsentEvent">
    </policy-consent-dashboard>

Typescript

Basically the same as for ES6, except you have types for the Config:

import * as angular from 'angular'
import ConsentModule, {ConsentConfig} from '@signatu/consent-angularjs'

const config: ConsentConfig = {
      apiKey: 'MY_API_KEY', 
      accessToken: 'MY_ACCESS_TOKEN'
}
...

Further information

Go to signatu.com or send us an email on support@signatu.com.

License

This library is MIT Licensed.

0.20.4

5 years ago

0.20.3

5 years ago

0.20.1

5 years ago

0.9.17

6 years ago

0.9.16

6 years ago

0.9.14

6 years ago

0.9.13

6 years ago

0.9.12

6 years ago

0.9.11

6 years ago

0.9.10

6 years ago

0.9.9

6 years ago

0.9.8

6 years ago

0.9.7

6 years ago

0.9.6

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago