Skip to content

Instantly share code, notes, and snippets.

@wilkerlucio
Forked from nathanhammond/testcase.html
Created December 15, 2011 01:36
Show Gist options
  • Save wilkerlucio/1479424 to your computer and use it in GitHub Desktop.
Save wilkerlucio/1479424 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 type="text/x-handlebars">
{{view templateName="president" nameBinding="MyApp.president.fullName"}}
</script>
<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')
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment