Reputation: 89
I want to scroll document to first invalid input in the form on button click (without using jquery of course). What a proper (angular-way) approach for this situation? Thanks.
Upvotes: 2
Views: 2350
Reputation: 1575
include jquery so you get the full selector ability and in your controller do
angular.element(".ng-invalid:first") ...
Upvotes: 2