Skip to content

Commit 6fe294f

Browse files
vandycknickvsavkin
authored andcommitted
(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
1 parent 46b03a5 commit 6fe294f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/angular2/src/core/annotations/annotations.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,18 @@ export class Directive {
135135
/**
136136
* Specifies which DOM events the directive listens to and what the action should be.
137137
*
138-
* The `event` property defines a set of `event` to `method` key-value pairs:
138+
* The `events` property defines a set of `event` to `method` key-value pairs:
139139
*
140-
* - `event` specifies the DOM event that the directive listens to.
141-
* - `onMethod` specifies the method to execute when the event occurs.
140+
* - `event1` specifies the DOM event that the directive listens to.
141+
* - `onMethod1` specifies the method to execute when the event occurs.
142142
*
143143
*
144144
* ## Syntax
145145
*
146146
* ```
147147
* @Directive({
148148
* events: {
149-
* 'event1': 'onMethod',
149+
* 'event1': 'onMethod1',
150150
* ...
151151
* }
152152
* }
@@ -157,7 +157,7 @@ export class Directive {
157157
* ```
158158
* @Decorator({
159159
* selector: 'input',
160-
* event: {
160+
* events: {
161161
* 'change': 'onChange'
162162
* }
163163
* })

0 commit comments

Comments
 (0)