37
37
*/
38
38
var ngEventDirectives = { } ;
39
39
forEach (
40
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave' . split ( ' ' ) ,
40
+ 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave submit ' . split ( ' ' ) ,
41
41
function ( name ) {
42
42
var directiveName = directiveNormalize ( 'ng-' + name ) ;
43
43
ngEventDirectives [ directiveName ] = [ '$parse' , function ( $parse ) {
@@ -164,6 +164,54 @@ forEach(
164
164
*/
165
165
166
166
167
+ /**
168
+ * @ngdoc directive
169
+ * @name ng.directive:ngKeydown
170
+ *
171
+ * @description
172
+ * Specify custom behavior on keydown event.
173
+ *
174
+ * @element ANY
175
+ * @param {expression } ngKeydown {@link guide/expression Expression } to evaluate upon
176
+ * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
177
+ *
178
+ * @example
179
+ * See {@link ng.directive:ngClick ngClick}
180
+ */
181
+
182
+
183
+ /**
184
+ * @ngdoc directive
185
+ * @name ng.directive:ngKeyup
186
+ *
187
+ * @description
188
+ * Specify custom behavior on keyup event.
189
+ *
190
+ * @element ANY
191
+ * @param {expression } ngKeyup {@link guide/expression Expression } to evaluate upon
192
+ * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
193
+ *
194
+ * @example
195
+ * See {@link ng.directive:ngClick ngClick}
196
+ */
197
+
198
+
199
+ /**
200
+ * @ngdoc directive
201
+ * @name ng.directive:ngKeypress
202
+ *
203
+ * @description
204
+ * Specify custom behavior on keypress event.
205
+ *
206
+ * @element ANY
207
+ * @param {expression } ngKeypress {@link guide/expression Expression } to evaluate upon
208
+ * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
209
+ *
210
+ * @example
211
+ * See {@link ng.directive:ngClick ngClick}
212
+ */
213
+
214
+
167
215
/**
168
216
* @ngdoc directive
169
217
* @name ng.directive:ngSubmit
@@ -176,7 +224,7 @@ forEach(
176
224
* attribute**.
177
225
*
178
226
* @element form
179
- * @param {expression } ngSubmit {@link guide/expression Expression } to eval.
227
+ * @param {expression } ngSubmit {@link guide/expression Expression } to eval. (Event object is available as `$event`)
180
228
*
181
229
* @example
182
230
<doc:example>
@@ -216,8 +264,3 @@ forEach(
216
264
</doc:scenario>
217
265
</doc:example>
218
266
*/
219
- var ngSubmitDirective = ngDirective ( function ( scope , element , attrs ) {
220
- element . bind ( 'submit' , function ( ) {
221
- scope . $apply ( attrs . ngSubmit ) ;
222
- } ) ;
223
- } ) ;
0 commit comments