Skip to content

Commit

Permalink
Updated README.md file to show the proper library usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ChijiokeFLW committed Jul 10, 2024
1 parent c83e431 commit 7ad7d58
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 117 deletions.
51 changes: 12 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ Available features include:

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Initialization](#Initialization)
4. [Usage](#usage)
5. [Support](#support)
6. [Contribution Guidelines](#contribution-guidelines)
7. [License](#license)
8. [Changelog](#)
3. [Usage](#usage)
4. [Support](#support)
5. [Contribution Guidelines](#contribution-guidelines)
6. [License](#license)
7. [Changelog](#)

## Requirements

Expand All @@ -43,39 +42,9 @@ Install the SDK
```bash
$ npm install flutterwave-angular-v3
# or
$ yarn add flutterwave-angular-v3

$ yarn add flutterwave-angular-v3
```

## Initialization

Import FlutterwaveModule to the app root module

```typescript
import { FlutterwaveModule } from "flutterwave-angular-v3"

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FlutterwaveModule
],
providers: [],
bootstrap: [AppComponent]
})
```

> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
Kindly include the following line in tsconfig.app.json under `compilerOptions` :

```
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
```

Then restart server and try again

## Usage

Add Flutterwave to your project as a component or directly in your code:
Expand All @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down Expand Up @@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
MakePaymentComponent,
InlinePaymentOptions,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";

@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[data]="paymentData"
></flutterwave-make-payment>`,
Expand Down Expand Up @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down
51 changes: 12 additions & 39 deletions dist/flutterwave-angular-v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ Available features include:

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Initialization](#Initialization)
4. [Usage](#usage)
5. [Support](#support)
6. [Contribution Guidelines](#contribution-guidelines)
7. [License](#license)
8. [Changelog](#)
3. [Usage](#usage)
4. [Support](#support)
5. [Contribution Guidelines](#contribution-guidelines)
6. [License](#license)
7. [Changelog](#)

## Requirements

Expand All @@ -43,39 +42,9 @@ Install the SDK
```bash
$ npm install flutterwave-angular-v3
# or
$ yarn add flutterwave-angular-v3

$ yarn add flutterwave-angular-v3
```

## Initialization

Import FlutterwaveModule to the app root module

```typescript
import { FlutterwaveModule } from "flutterwave-angular-v3"

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FlutterwaveModule
],
providers: [],
bootstrap: [AppComponent]
})
```

> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
Kindly include the following line in tsconfig.app.json under `compilerOptions` :

```
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
```

Then restart server and try again

## Usage

Add Flutterwave to your project as a component or directly in your code:
Expand All @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down Expand Up @@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
MakePaymentComponent,
InlinePaymentOptions,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";

@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[data]="paymentData"
></flutterwave-make-payment>`,
Expand Down Expand Up @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down
51 changes: 12 additions & 39 deletions projects/flutterwave-angular-v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ Available features include:

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Initialization](#Initialization)
4. [Usage](#usage)
5. [Support](#support)
6. [Contribution Guidelines](#contribution-guidelines)
7. [License](#license)
8. [Changelog](#)
3. [Usage](#usage)
4. [Support](#support)
5. [Contribution Guidelines](#contribution-guidelines)
6. [License](#license)
7. [Changelog](#)

## Requirements

Expand All @@ -43,39 +42,9 @@ Install the SDK
```bash
$ npm install flutterwave-angular-v3
# or
$ yarn add flutterwave-angular-v3

$ yarn add flutterwave-angular-v3
```

## Initialization

Import FlutterwaveModule to the app root module

```typescript
import { FlutterwaveModule } from "flutterwave-angular-v3"

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FlutterwaveModule
],
providers: [],
bootstrap: [AppComponent]
})
```

> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
Kindly include the following line in tsconfig.app.json under `compilerOptions` :

```
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
```

Then restart server and try again

## Usage

Add Flutterwave to your project as a component or directly in your code:
Expand All @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down Expand Up @@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
MakePaymentComponent,
InlinePaymentOptions,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";

@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[data]="paymentData"
></flutterwave-make-payment>`,
Expand Down Expand Up @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
import { Component, OnInit } from "@angular/core";
import {
FlutterwaveService,
InlinePaymentOptions,
MakePaymentComponent,
PaymentSuccessResponse,
} from "flutterwave-angular-v3";
@Component({
selector: "app-root",
imports: [MakePaymentComponent],
template: ` <flutterwave-make-payment
[public_key]="publicKey"
amount="10"
Expand Down

0 comments on commit 7ad7d58

Please sign in to comment.