I didn’t find any good documentation for getting started with the Ember.js. Please help me,
Here is a simple example i tried from http://emberjs.com/documentation/ But nothing displayed on screen.
Error: MyApp is not defined
Javascript: app.js
MyApp.president = Ember.Object.create({
firstName: "Barack",
lastName: "Obama",
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
// Tell Ember that this computed property depends on firstName
// and lastName
}.property('firstName', 'lastName')
});
HTML
<p>
<script type="text/x-handlebars">
The President of the United States is {{MyApp.president.fullName}}.
</script>
</p>
I included all the JS files from the getting started Kit.
You’ve forgot to define MyApp, which has to be an instance of Ember.Application:
Here is one very comprehensive tutorial I’ve found few weeks ago, maybe it would be useful for your learning purposes: http://www.appliness.com/flame-on-a-beginners-guide-to-ember-js/