How to slice the input text Field Value using Angular JS
HTML FORM
<form>
<input type="text" ng-model="cardExp">
</form>
JS
console.log($scope.cardExp) //output : 122016
I want to make text field value ("122016") into variables a and b and their vales are
a is first two digits
b is next 4 digits
Thanks,
substring.