1.0.2 • Published 1 year ago

ng-credit-card-component v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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.
1.0.2

1 year ago

1.0.1

1 year ago