Created
October 18, 2016 20:11
-
-
Save hadijaveed/73bd96b26e0336494826ec1bd4a09f28 to your computer and use it in GitHub Desktop.
This file contains 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
let counter = new ReactiveHbs({ | |
container: '.mount', // html template mount point | |
template: '#tpl', // hadnlebars template | |
data: { | |
count: 0 | |
} | |
}); | |
// Events | |
counter.events({ | |
'click [name="increment-count"]': (e, elm, tpl) => { | |
tpl.set( 'count', tpl.get('count') + 1 ); | |
} | |
}); | |
counter.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment