ng-class="{a: field.$invalid, b: field.$valid}"
On 11 May 2014 16:58, J <[email protected]> wrote:
> Hi,
>
> I understand how I can say if a whole form is invalid disable button,
>
> but what I want is if field is invalid display class a, else display class
> b?
>
> How can I do this with angular is there an
>
> if(field.isvalid){
> }
>
> type validation? or something on the actual html element itself?
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.