Skip to content

Commit 7ad7d58

Browse files
committed
Updated README.md file to show the proper library usage
1 parent c83e431 commit 7ad7d58

File tree

3 files changed

+36
-117
lines changed

3 files changed

+36
-117
lines changed

README.md

+12-39
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ Available features include:
2323

2424
1. [Requirements](#requirements)
2525
2. [Installation](#installation)
26-
3. [Initialization](#Initialization)
27-
4. [Usage](#usage)
28-
5. [Support](#support)
29-
6. [Contribution Guidelines](#contribution-guidelines)
30-
7. [License](#license)
31-
8. [Changelog](#)
26+
3. [Usage](#usage)
27+
4. [Support](#support)
28+
5. [Contribution Guidelines](#contribution-guidelines)
29+
6. [License](#license)
30+
7. [Changelog](#)
3231

3332
## Requirements
3433

@@ -43,39 +42,9 @@ Install the SDK
4342
```bash
4443
$ npm install flutterwave-angular-v3
4544
# or
46-
$ yarn add flutterwave-angular-v3
47-
45+
$ yarn add flutterwave-angular-v3
4846
```
4947

50-
## Initialization
51-
52-
Import FlutterwaveModule to the app root module
53-
54-
```typescript
55-
import { FlutterwaveModule } from "flutterwave-angular-v3"
56-
57-
@NgModule({
58-
declarations: [
59-
AppComponent
60-
],
61-
imports: [
62-
BrowserModule,
63-
FlutterwaveModule
64-
],
65-
providers: [],
66-
bootstrap: [AppComponent]
67-
})
68-
```
69-
70-
> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
71-
Kindly include the following line in tsconfig.app.json under `compilerOptions` :
72-
73-
```
74-
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
75-
```
76-
77-
Then restart server and try again
78-
7948
## Usage
8049

8150
Add Flutterwave to your project as a component or directly in your code:
@@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
9564
import { Component, OnInit } from "@angular/core";
9665
import {
9766
FlutterwaveService,
98-
InlinePaymentOptions,
67+
MakePaymentComponent,
9968
PaymentSuccessResponse,
10069
} from "flutterwave-angular-v3";
10170
@Component({
10271
selector: "app-root",
72+
imports: [MakePaymentComponent],
10373
template: ` <flutterwave-make-payment
10474
[public_key]="publicKey"
10575
amount="10"
@@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
158128
import { Component, OnInit } from "@angular/core";
159129
import {
160130
FlutterwaveService,
131+
MakePaymentComponent,
161132
InlinePaymentOptions,
162133
PaymentSuccessResponse,
163134
} from "flutterwave-angular-v3";
164135

165136
@Component({
166137
selector: "app-root",
138+
imports: [MakePaymentComponent],
167139
template: ` <flutterwave-make-payment
168140
[data]="paymentData"
169141
></flutterwave-make-payment>`,
@@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
341313
import { Component, OnInit } from "@angular/core";
342314
import {
343315
FlutterwaveService,
344-
InlinePaymentOptions,
316+
MakePaymentComponent,
345317
PaymentSuccessResponse,
346318
} from "flutterwave-angular-v3";
347319
@Component({
348320
selector: "app-root",
321+
imports: [MakePaymentComponent],
349322
template: ` <flutterwave-make-payment
350323
[public_key]="publicKey"
351324
amount="10"

dist/flutterwave-angular-v3/README.md

+12-39
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ Available features include:
2323

2424
1. [Requirements](#requirements)
2525
2. [Installation](#installation)
26-
3. [Initialization](#Initialization)
27-
4. [Usage](#usage)
28-
5. [Support](#support)
29-
6. [Contribution Guidelines](#contribution-guidelines)
30-
7. [License](#license)
31-
8. [Changelog](#)
26+
3. [Usage](#usage)
27+
4. [Support](#support)
28+
5. [Contribution Guidelines](#contribution-guidelines)
29+
6. [License](#license)
30+
7. [Changelog](#)
3231

3332
## Requirements
3433

@@ -43,39 +42,9 @@ Install the SDK
4342
```bash
4443
$ npm install flutterwave-angular-v3
4544
# or
46-
$ yarn add flutterwave-angular-v3
47-
45+
$ yarn add flutterwave-angular-v3
4846
```
4947

50-
## Initialization
51-
52-
Import FlutterwaveModule to the app root module
53-
54-
```typescript
55-
import { FlutterwaveModule } from "flutterwave-angular-v3"
56-
57-
@NgModule({
58-
declarations: [
59-
AppComponent
60-
],
61-
imports: [
62-
BrowserModule,
63-
FlutterwaveModule
64-
],
65-
providers: [],
66-
bootstrap: [AppComponent]
67-
})
68-
```
69-
70-
> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
71-
Kindly include the following line in tsconfig.app.json under `compilerOptions` :
72-
73-
```
74-
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
75-
```
76-
77-
Then restart server and try again
78-
7948
## Usage
8049

8150
Add Flutterwave to your project as a component or directly in your code:
@@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
9564
import { Component, OnInit } from "@angular/core";
9665
import {
9766
FlutterwaveService,
98-
InlinePaymentOptions,
67+
MakePaymentComponent,
9968
PaymentSuccessResponse,
10069
} from "flutterwave-angular-v3";
10170
@Component({
10271
selector: "app-root",
72+
imports: [MakePaymentComponent],
10373
template: ` <flutterwave-make-payment
10474
[public_key]="publicKey"
10575
amount="10"
@@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
158128
import { Component, OnInit } from "@angular/core";
159129
import {
160130
FlutterwaveService,
131+
MakePaymentComponent,
161132
InlinePaymentOptions,
162133
PaymentSuccessResponse,
163134
} from "flutterwave-angular-v3";
164135

165136
@Component({
166137
selector: "app-root",
138+
imports: [MakePaymentComponent],
167139
template: ` <flutterwave-make-payment
168140
[data]="paymentData"
169141
></flutterwave-make-payment>`,
@@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
341313
import { Component, OnInit } from "@angular/core";
342314
import {
343315
FlutterwaveService,
344-
InlinePaymentOptions,
316+
MakePaymentComponent,
345317
PaymentSuccessResponse,
346318
} from "flutterwave-angular-v3";
347319
@Component({
348320
selector: "app-root",
321+
imports: [MakePaymentComponent],
349322
template: ` <flutterwave-make-payment
350323
[public_key]="publicKey"
351324
amount="10"

projects/flutterwave-angular-v3/README.md

+12-39
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ Available features include:
2323

2424
1. [Requirements](#requirements)
2525
2. [Installation](#installation)
26-
3. [Initialization](#Initialization)
27-
4. [Usage](#usage)
28-
5. [Support](#support)
29-
6. [Contribution Guidelines](#contribution-guidelines)
30-
7. [License](#license)
31-
8. [Changelog](#)
26+
3. [Usage](#usage)
27+
4. [Support](#support)
28+
5. [Contribution Guidelines](#contribution-guidelines)
29+
6. [License](#license)
30+
7. [Changelog](#)
3231

3332
## Requirements
3433

@@ -43,39 +42,9 @@ Install the SDK
4342
```bash
4443
$ npm install flutterwave-angular-v3
4544
# or
46-
$ yarn add flutterwave-angular-v3
47-
45+
$ yarn add flutterwave-angular-v3
4846
```
4947

50-
## Initialization
51-
52-
Import FlutterwaveModule to the app root module
53-
54-
```typescript
55-
import { FlutterwaveModule } from "flutterwave-angular-v3"
56-
57-
@NgModule({
58-
declarations: [
59-
AppComponent
60-
],
61-
imports: [
62-
BrowserModule,
63-
FlutterwaveModule
64-
],
65-
providers: [],
66-
bootstrap: [AppComponent]
67-
})
68-
```
69-
70-
> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service.
71-
Kindly include the following line in tsconfig.app.json under `compilerOptions` :
72-
73-
```
74-
paths": { "@angular/*": [ "node_modules/@angular/*" ] }
75-
```
76-
77-
Then restart server and try again
78-
7948
## Usage
8049

8150
Add Flutterwave to your project as a component or directly in your code:
@@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes.
9564
import { Component, OnInit } from "@angular/core";
9665
import {
9766
FlutterwaveService,
98-
InlinePaymentOptions,
67+
MakePaymentComponent,
9968
PaymentSuccessResponse,
10069
} from "flutterwave-angular-v3";
10170
@Component({
10271
selector: "app-root",
72+
imports: [MakePaymentComponent],
10373
template: ` <flutterwave-make-payment
10474
[public_key]="publicKey"
10575
amount="10"
@@ -158,12 +128,14 @@ Pass in the payment parameters as an object to the component `data` attribute.
158128
import { Component, OnInit } from "@angular/core";
159129
import {
160130
FlutterwaveService,
131+
MakePaymentComponent,
161132
InlinePaymentOptions,
162133
PaymentSuccessResponse,
163134
} from "flutterwave-angular-v3";
164135

165136
@Component({
166137
selector: "app-root",
138+
imports: [MakePaymentComponent],
167139
template: ` <flutterwave-make-payment
168140
[data]="paymentData"
169141
></flutterwave-make-payment>`,
@@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https://
341313
import { Component, OnInit } from "@angular/core";
342314
import {
343315
FlutterwaveService,
344-
InlinePaymentOptions,
316+
MakePaymentComponent,
345317
PaymentSuccessResponse,
346318
} from "flutterwave-angular-v3";
347319
@Component({
348320
selector: "app-root",
321+
imports: [MakePaymentComponent],
349322
template: ` <flutterwave-make-payment
350323
[public_key]="publicKey"
351324
amount="10"

0 commit comments

Comments
 (0)