I have the following textarea
<textarea ng-model="comment" name="comment">
Where I need to apply a style to a button with ng-class
when entering a value in textarea
<a on-touch="confirm()" style="width:160px; cursor: pointer;"
class="btn {{ngDialogData.estiloBotonConfirm}}"
ng-class="{'pasoDeshabilitado': !activoCheck || comment == '' }" >
Aceptar
</a>
Create the variable scope.activoCheck
, to which you assign true
, but at the time of debugging the value of scope.comment
does not contain value.
In the controller I declare the variable $scope.comment="";