Skip to content

Commit 1c1da26

Browse files
phollykazupon
authored andcommitted
Add disclaimer that $on cannot be used to listen to events from children (vuejs#671)
1 parent 0a4e653 commit 1c1da26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/v2/guide/components.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ Every Vue instance implements an [events interface](../api/#Instance-Methods-Eve
448448

449449
In addition, a parent component can listen to the events emitted from a child component using `v-on` directly in the template where the child component is used.
450450

451+
<p class="tip">You cannot use `$on` to listen to events emitted by children. You must use `v-on` directly in the template, as in the example below.</p>
452+
451453
Here's an example:
452454

453455
``` html

0 commit comments

Comments
 (0)