Created
February 17, 2014 00:52
-
-
Save stephentcannon/9042875 to your computer and use it in GitHub Desktop.
a meteor pattern for a generic event handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
{{> eventhandler}} | |
</body> | |
<template name="eventhandler"> | |
{{> template1 }} | |
{{> template2 }} | |
{{> template3 }} | |
</template> | |
Template.template1.events({ | |
// will fire first | |
// stopPropagation to prevent bubbling in this template | |
// stopImmediatePropagation to prevent bubbling to parent templates | |
}) | |
Template.eventHandler.events({ | |
// will fire last | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment