Short Answer: Vanilla AngularJS does not offer a direct option for this task, but it is possible to achieve with a workaround.
Long Answer: When using DOM event handling directives like ng-click, ng-keydown, and ng-submit in Angular, the expressions are compiled by Angular's $parse service. This process can be observed in the source code for the event directive. The $parse service has its own lexer and parser implementation which compiles the expression into JavaScript code.
The resulting JavaScript code includes safety measures to prevent errors, such as checking if functions are defined before executing them. For instance, a button with the ng-click directive will generate JavaScript that checks if the handleClick function exists before invoking it.
<button ng-click="handleClick()">Click Me!</button>
This would translate to something like:
if ($scope.handleClick != null) {
return $scope.handleClick();
} else {
return undefined;
}