ng-credit-card-component

1.0.2 • Public • Published

Credit Card Component

a simple angular credit-card component to use in your's dashboard applications.

Installation

Install using npm:

npm install ng-credit-card-component

Usage
Import the CreditCardDividerModule in your Angular module:
typescript
import { CreditCardDividerModule } from 'credit-card-divider';

@NgModule({
  imports: [
    // ...
    CreditCardDividerModule
  ],
  // ...
})
export class YourModule { }

Use the <lib-credit-card-divider> component in your template:
html
<lib-credit-card-divider 
    [(cardNumber)]="cardNumber"
    [(expiryMonth)]="expiryMonth" 
    [(expiryYear)]="expiryYear"
    [(cardHolderName)]="cardHolderName">
</lib-credit-card-divider>

typescript
export class YourComponent {
  cardNumber: string; 
  expiryMonth: string; 
  expiryYear: string;   
  cardHolderName: string;
}

API
Inputs
cardNumber: The credit card number to be formatted.
expiryMonth: The credit card expiryMonth to be formatted.
expiryYear: The credit card expiryYear to be formatted.
cardHolderName: The credit card cardHolderName to be formatted.

Package Sidebar

Install

npm i ng-credit-card-component

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

167 kB

Total Files

9

Last publish

Collaborators

  • skullbreaker