Installing
$ npm install --save oneaccount-angular
Quickstart
Import oneaccount-angular module in Angular app.
import { OneaccountModule } from 'oneaccount-angular';
@NgModule({
(...)
imports: [
OneaccountModule
]
(...)
})
Usage
<one-account
externalId="{here comes your application id}"
(update)="update($event)">
</one-account>
update(uuid: string) {
// send uuid to backend
}
Options
externalId (string, required)
This field is generated automatically when the app is created (please don't change)
color (string) = '#3C444F'
Defines the color of whole library elements
floatingMode (boolean) = false
Enables floating mode (disable if you want to customize the library)
closeOnOutsideClick (boolean) = true
If true click outside of the popup closes it (works only when floatingMode enabled)
updateInterval (number, ms) = 60 * 1000
Interval to update the qr-code
title (string) = 'Download One account mobile app and scan the qr code'
Title describes usage of the application (works only when showInstructions enabled)
subtitle (string) = 'or click the QR code if One account is installed on current device'
Subtitle describes usage of the application on current device (works only when showInstructions enabled)
Events
update (uuid: string)
Fires on every qr-code update and emits new uuid