I would like to call functions in ngClass. I can only call the function, and if I want to call other classes it does not catch, its just put the function in the class it can call (ng-class="styleClass (5)"), but I want some classes always and others can be changed by other validations. When I take the example function, it works fine.
Follow the example:
JavaScript
$scope.styleClass = function(i) {
console.log("entrou");
if(i>1){
return 'bg';
}
return ''
}
HTML
First Name: <input type="text" ng-class="{'text':true, 'padd':true, 'styleClass(5)':true}" ng-model="firstName"><br>