function(element) {
      var parent = $mdUtil.getClosest(element, 'form');
      var form = parent ? angular.element(parent).controller('form') : null;

      return form ? form.$submitted : false;
    }
function(element) {
      var parent = $mdUtil.getClosest(element, 'form');
      var form = parent ? angular.element(parent).controller('form') : null;

      return form ? form.$submitted : false;
    }
function ( element ) { var parent = $mdUtil . getClosest ( element , 'form' ) ; var form = parent ? angular . element ( parent ) . controller ( 'form' ) : null ; return form ? form . $submitted : false ; }
Returns true if the parent form of the element has been submitted.

@param element An AngularJS or HTML5 element.

@returns {boolean}
Returns true if the parent form of the element has been submitted .
Returns true if the element is submitted