Skip to content

Instantly share code, notes, and snippets.

Created December 27, 2012 02:00
Show Gist options
  • Save anonymous/4384810 to your computer and use it in GitHub Desktop.
Save anonymous/4384810 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="handlebars-1.0.rc.1.min.js"></script>
<script src="ember-1.0.pre.min.js"></script>
</head>
<body>
<script type="text/x-handlebars">
{{#view CounterView}}
Counter: {{Counter.value}}
<button {{action "increment"}}>Add 1</button>
{{/view}}
</script>
<script>
Counter = Ember.Object.create({
value: 1,
})
CounterView = Ember.View.extend({
increment: function(event) {
Foo.incrementProperty('bar');
}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment