Ember.js Starter Kit
Based on latest version (as of today) of the official Ember.js starter kit:
https://github.com/emberjs/starter-kit
Links to latest full-size versions of Handlebars, Ember, and Ember-Data.
HTML
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js"></script>
<script src="http://builds.emberjs.com/beta/ember.js"></script>
<script type="text/x-handlebars" data-template-name="application">
<div>
{{#each}}
{{value}}
{{/each}}
</div>
{{numItems}}
<button {{action 'add'}}>add</button>
</script>
JavaScript
var App = Ember.Application.create();
App.ApplicationController = Ember.ArrayController.extend({
numItems: function() {
return this.get('model').length;
}.property('model.[]'),
actions: {
add: function() {
this.get('model').pushObject({ value: 'three' });
}
}
});
App.ApplicationRoute = Ember.Route.extend({
model: function() {
return [{ value: 'one'}, { value: 'two' }]
}
});