From 6fe294ff2b324c4ff80e7f50cce0c5b8580290b7 Mon Sep 17 00:00:00 2001 From: Nick Van Dyck Date: Mon, 16 Mar 2015 22:46:05 +0100 Subject: [PATCH] (docs) decorator events typo? Ok I'm not sure (trying to understand angular2) but according to what i can see. Shouldn't the decorator event property be events. Please correct me if I'm wrong :p --- modules/angular2/src/core/annotations/annotations.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/angular2/src/core/annotations/annotations.js b/modules/angular2/src/core/annotations/annotations.js index 8b5ca342fa..6b0fe3aefc 100644 --- a/modules/angular2/src/core/annotations/annotations.js +++ b/modules/angular2/src/core/annotations/annotations.js @@ -135,10 +135,10 @@ export class Directive { /** * Specifies which DOM events the directive listens to and what the action should be. * - * The `event` property defines a set of `event` to `method` key-value pairs: + * The `events` property defines a set of `event` to `method` key-value pairs: * - * - `event` specifies the DOM event that the directive listens to. - * - `onMethod` specifies the method to execute when the event occurs. + * - `event1` specifies the DOM event that the directive listens to. + * - `onMethod1` specifies the method to execute when the event occurs. * * * ## Syntax @@ -146,7 +146,7 @@ export class Directive { * ``` * @Directive({ * events: { - * 'event1': 'onMethod', + * 'event1': 'onMethod1', * ... * } * } @@ -157,7 +157,7 @@ export class Directive { * ``` * @Decorator({ * selector: 'input', - * event: { + * events: { * 'change': 'onChange' * } * })