How to validate if a text area has values with angular?

1

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="";

    
asked by Jose Luis GP 04.04.2018 в 00:59
source

0 answers