AngularJS Developer Question:
Download Questions PDF

Explain me how to validate data in AngularJS?

Answer:

AngularJS enriches form filling and validation. We can use $dirty and $invalid flags to do the validations in seamless way. Use novalidate with a form declaration to disable any browser specific validation.

☛ Following can be used to track error.

☛ $dirty − states that value has been changed.

☛ $invalid − states that value entered is invalid.

☛ $error − states the exact error.

Download AngularJS Developer Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between AngularJS and backbone.js?Tell me what are the differences between service and factory methods?