Smahane Smahane - 14 days ago 5
CSS Question

Ho to edit the css style of validation ng-class error

My question is verry simple:
How can I edit the css style of the ng-class validation error 'error' of bootstrap v3?

here is my code:

ng-class="(form.datos.$invalid) && ( form.datos.$touched || submitted) ? 'error': '' "


the error style here is a background red which i didn't like i want to change it to an other color.

Thank you!

Answer

You should overrite the css but if you want to do it with angular you could use ng-style directive, and it would look like

ng-style="(form.datos.$invalid) && ( form.datos.$touched || submitted) && {'background-color':'#00F'}"