I have a form where the credit card type is detected when typed.
The type of card is in the field "paymentForm.cardNumber.$ccEagerType" and I can show it using:
{{paymentForm.cardNumber.$ccEagerType|lowercase}} --> 'visa', 'maastercard'....
if I use ng-class="'visa'" in my form all works well.
But I ´d like to use
ng-class="'{{paymentForm.cardNumber.$ccEagerType|lowercase}}'"
and this is not working.
What am I doing wrong?
<form class="form-horizontal" role="form" name="paymentForm" novalidate>
<div class="form-group">
<label class="col-sm-3 control-label" for="card-number">Card</label>
<div class="col-sm-6">
<input type="text" class="form-control input-lg"
ng-class="'visa'" ng-model="card.number" cc-number cc-eager-type
name="cardNumber" ui-credit-card-mask id="cardNumber" placeholder="Cartao Visa, Mastercard e Discover">
</div>
</div>
</form>
//css
.visa {
background-image: url('....
}
.mastercard{
background-image: url('....
}