Skip to content

Instantly share code, notes, and snippets.

@nathanhammond
Created December 14, 2011 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nathanhammond/1478619 to your computer and use it in GitHub Desktop.
Save nathanhammond/1478619 to your computer and use it in GitHub Desktop.
Simplified testcase for Ember bug.
<!doctype html>
<html lang="en">
<head>
<title>Ember Bug</title>
<script type="text/x-handlebars" data-template-name="president">
The President of the United States is {{name}}.
</script>
</head>
<body>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.1.js"></script>
<script>
var MyApp = Ember.Application.create();
MyApp.president = Ember.Object.create({
firstName: "Barack",
lastName: "Obama",
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
// Call this flag to mark the function as a property
}.property('firstName','lastName')
});
var firstView = Ember.View.create({
templateName: 'president',
nameBinding: 'MyApp.president.fullName'
});
firstView.append();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment