Created
February 12, 2013 09:34
-
-
Save chomwitt/4761198 to your computer and use it in GitHub Desktop.
testing a simple handlebar expression in an ember template in emberstarterkit
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
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