Created
December 14, 2011 21:26
-
-
Save nathanhammond/1478619 to your computer and use it in GitHub Desktop.
Simplified testcase for Ember bug.
This file contains 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
<!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