Angular Creditcard Flag directive for AngularJS


This directive will look for attribute "creditcard-flag" on an input field, will add a class card-flag and a SPAN with a class "_flag" after it, when you start typing a number, it will add a class corresponding to the Credit Card brand.

All the magic happens in your CSS

Example:

<input name="test" maxlengh="19"  ng-model="field.example1" angular-mask="0000-0000-0000-0000" creditcard-flag />

Install via bower

bower install angular-creditcard-flag --save