# Orel Card Ipg

## Installation

`npm i ng-orel-card-ipg`

## Card Adding

### Setup

#### app.module.ts
```angularjs
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import {NgOrelCardIpgModule} from 'ng-orel-card-ipg';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgOrelCardIpgModule.forRoot({stage: 'dev'}),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

#### app.component.ts

```angularjs
import { Component } from '@angular/core';
import { NgOrelCardIpgService } from 'ng-orel-card-ipg';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'angular-orel-test';

 constructor(private orelIpg: NgOrelCardIpgService){

 }

 openCardAdding(){
   let token = 'xxxxxxxxxxx'; //orel-sso token
   let referance = 'xxxxx';
   this.orelIpg.AddCard(token, referance).then((response) => {
      alert(response);
   }).catch(error => {
      alert(error);
   })
 }

}
```

#### app.component.html

```html
<button (click)="openCardAdding()">Add Card</button>
<br/><br/>

<div style="height: 500px;">
  <lib-ng-orel-card-ipg></lib-ng-orel-card-ipg>
</div>
```

#### Change log
```angular2html
V1.0.9  - Api urls update
V1.0.10  - Api urls issue fix
``` 

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.9.

