I\'ve read several articles and StackOverflow questions relating to the setting of focus in AngularJs.
Unfortunately all the examples that I have read assume that th
just one line:
if($scope.formName.$valid){ //submit } else{ $scope.formName.$error.required[0].$$element.focus(); }