code: function initHandlingOfViewFunctionsReturningAPromise(eventToHandle, attrToParse, btnEl) {
            // If the priority is higher then zero, we are sure that ngSubmit already attached the event handler,
            // if not, then we need to execute with $evalAsync
            if (cfg.priority > 0) {
              updateHandler(eventToHandle, attrToParse, btnEl);
            } else {
              scope.$evalAsync(function () {
                updateHandler(eventToHandle, attrToParse, btnEl);
              });
            }
          }
docs: Used for the function syntax of the promise button directive by
  parsing the expressions provided by the attribute via getCallbacks().
  Unbinds the default event handlers, which is why it might sometimes
  be required to use the promise syntax.
  
  @param {String}eventToHandle the event to handle
  @param {String}attrToParse the attribute to parse the callback from (ngClick or ngSubmit)
  @param {Object}btnEl the button element to disable and add spinner