aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngEventDirs.js
diff options
context:
space:
mode:
authorWesley Cho2013-05-23 11:22:55 -0400
committerIgor Minar2013-07-11 17:24:30 -0700
commit3371fc254a9698eae35bb6f8f1ee9c434ae761e2 (patch)
treeeff3ae4ac470ce86986eecd0c8a5d7b514f345f2 /src/ng/directive/ngEventDirs.js
parent09a1e7af129880cab89a2f709f22a7286f52371e (diff)
downloadangular.js-3371fc254a9698eae35bb6f8f1ee9c434ae761e2.tar.bz2
fix(ngSubmit): expose $event to ngSubmit callback
Diffstat (limited to 'src/ng/directive/ngEventDirs.js')
-rw-r--r--src/ng/directive/ngEventDirs.js9
1 files changed, 2 insertions, 7 deletions
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
<doc:example>
@@ -264,8 +264,3 @@ forEach(
</doc:scenario>
</doc:example>
*/
-var ngSubmitDirective = ngDirective(function(scope, element, attrs) {
- element.on('submit', function() {
- scope.$apply(attrs.ngSubmit);
- });
-});