0.20.4 • Published 5 years ago
@signatu/policy-angularjs v0.20.4
AngularJS components for Signatu Policy
This library contains AngularJS (aka Angular version 1)client components for Signatu Policy. It depends on the Signatu service, and the library interacts with signatu.com
.
Installation
npm
npm install @signatu/policy-angularjs
yarn
yarn add @signatu/policy-angularjs
Usage
The library contains the following components:
policy-link
: renders a link that will open the privacy policy when clicked.policy-button
: renders a button that will open the Privacy Policy when clicked.
Properties
ES6
import angular from 'angular'
import PolicyModule from '@signatu/policy-angularjs'
angular.module('myApp', [PolicyModule.name])
.controller('myCtrl', function($scope) {
$scope.policyConfig = {
apiKey: 'MY_API_KEY',
accessToken: 'MY_ACCESS_TOKEN'
};
})
})
Now you can use the components in your HTML:
<policy-button
config="policyConfig"
policy-id="MY_POLICY_ID"
color="white">
</policy-button>
Typescript
Basically the same as for ES6, except you have types for the Config:
import * as angular from 'angular'
import PolicyModule, {PolicyConfig} from '@signatu/policy-angularjs'
const config: PolicyConfig = {
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.