1.0.25
https://jsfiddle.net/oL5qyky9/
Press the dispatch event button
alert('handled it')
alert('handleIt did not run');
Once you change it from childMsg
back to child-msg
it behaves as expected.
Removing the 'events obj' from parent did the trick:
https://jsfiddle.net/oL5qyky9/2/
I think that the events obj with 'child-msg' key was 'overwriting' the method bind in template.
Because you changed child-msg
in the example to childMsg
. Note when using v-on
in the template, the event name will be turned into lowercase by the browser. This is part of the 1.x template parsing restrictions, so avoid using uppercase letters in event names in 1.x.
2.0 doesn't have this limitation.
Ahh that makes sense. Thanks guys.
Most helpful comment
Because you changed
child-msg
in the example tochildMsg
. Note when usingv-on
in the template, the event name will be turned into lowercase by the browser. This is part of the 1.x template parsing restrictions, so avoid using uppercase letters in event names in 1.x.2.0 doesn't have this limitation.