Answer the question
In order to leave comments, you need to log in
How to scroll a window to the first invalid input in AngularJS?
A common behavior for long forms - when the submit button is clicked - is to show the user erroneously filled fields and scroll the document to the first such field.
How can this behavior be implemented in AngularJS without using jQuery?
Answer the question
In order to leave comments, you need to log in
var firstInvalidInput = angular.element(".ng-invalid")[0];
- get the first invalid input. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question