Skip to content
Berbix Angular SDK for rendering the Berbix Verify flow
TypeScript JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
projects/berbix
.editorconfig
.gitignore
README.md
angular.json
package-lock.json
package.json
release.sh
tsconfig.json
tslint.json
version

README.md

Berbix Angular SDK

This Berbix Angular library provides simple interfaces to interact with the Berbix Verify flow.

Installation

npm install berbix-angular

Usage

Basic usage

Add the BerbixComponent to your module declarations. For example, a new project generated with ng new might include the following.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { BerbixComponent } from 'berbix-angular';


@NgModule({
  declarations: [
    AppComponent,
    BerbixComponent,
  ],
  imports: [
    BrowserModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Now you can use the lib-berbix component in your templates.

<lib-berbix
  clientId="your_client_id"
  clientToken="your_client_token"
  environment="production"
  (flowDisplayed)="display()"
  (flowCompleted)="complete($event)"
></lib-berbix>

Full list of props

// Required
@Input() clientId: string;

// Optional
@Input() clientToken: string;
@Input() templateKey: string;
@Input() email: string;
@Input() phone: string;
@Input() environment: string;

// Event emitters
@Output() flowCompleted = new EventEmitter<FlowCompletedEvent>();
@Output() flowError = new EventEmitter<object>();
@Output() flowDisplayed = new EventEmitter<any>();
@Output() flowStateChange = new EventEmitter<object>();

Publishing

# Update the version in package.json
ng build
cd dist/berbix
npm publish
You can’t perform that action at this time.