From 3371fc254a9698eae35bb6f8f1ee9c434ae761e2 Mon Sep 17 00:00:00 2001
From: Wesley Cho
Date: Thu, 23 May 2013 11:22:55 -0400
Subject: fix(ngSubmit): expose $event to ngSubmit callback
---
src/AngularPublic.js | 1 -
src/ng/directive/ngEventDirs.js | 9 ++-------
test/ng/directive/ngEventDirsSpec.js | 17 +++++++++++++++++
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/AngularPublic.js b/src/AngularPublic.js
index 53ad5aab..15f9cbca 100755
--- a/src/AngularPublic.js
+++ b/src/AngularPublic.js
@@ -88,7 +88,6 @@ function publishExternalAPI(angular){
ngPluralize: ngPluralizeDirective,
ngRepeat: ngRepeatDirective,
ngShow: ngShowDirective,
- ngSubmit: ngSubmitDirective,
ngStyle: ngStyleDirective,
ngSwitch: ngSwitchDirective,
ngSwitchWhen: ngSwitchWhenDirective,
diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js
index 9420f720..ac13f472 100644
--- a/src/ng/directive/ngEventDirs.js
+++ b/src/ng/directive/ngEventDirs.js
@@ -37,7 +37,7 @@
*/
var ngEventDirectives = {};
forEach(
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress'.split(' '),
+ 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit'.split(' '),
function(name) {
var directiveName = directiveNormalize('ng-' + name);
ngEventDirectives[directiveName] = ['$parse', function($parse) {
@@ -224,7 +224,7 @@ forEach(
* attribute**.
*
* @element form
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
+ * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)
*
* @example