Skip to content

Instantly share code, notes, and snippets.

@chomwitt
Created February 12, 2013 09:34
Show Gist options
  • Save chomwitt/4761198 to your computer and use it in GitHub Desktop.
Save chomwitt/4761198 to your computer and use it in GitHub Desktop.
testing a simple handlebar expression in an ember template in emberstarterkit
index.html----------------------
<script type="text/x-handlebars">
{{#view App.MyView}}
<h1>Hello world!</h1>
{{/view}}
<p>{{firstName}},{{lastName}}</p>
</script>
app.js----------------------
var App = Em.Application.create();
App.MyView = Em.View.extend({
mouseDown: function() {
window.alert("hello world!");
}
});
App.ApplicationController = Ember.Controller.extend({
firstName: "Trek",
lastName: "Glowacki"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment