ng-credit-card-component
v1.0.2
Published
a simple angular credit-card component to use in your's dashboard applications.
Downloads
4
Maintainers
Readme
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.