feat(events): support preventdefault

Fixes #1039
Closes #1397
This commit is contained in:
Marc Laval
2015-04-16 18:03:15 +02:00
parent aabe83cf63
commit 883e1c1541
5 changed files with 61 additions and 9 deletions

View File

@ -391,6 +391,7 @@ export class Directive extends Injectable {
*
* - `event1`: the DOM event that the directive listens to.
* - `statement`: the statement to execute when the event occurs.
* If the evalutation of the statement returns `false`, then `preventDefault`is applied on the DOM event.
*
* To listen to global events, a target must be added to the event name.
* The target can be `window`, `document` or `body`.