Ember Latest
The latest build of Ember.
by marciojunior
HTML
<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<script type="text/x-handlebars">
<ul class="nav nav-pills nav-stacked">
{{#each post in controller}}
{{#link-to 'post' post tagName="li" class="list-group-item" }}
<a href="#">{{post.title}}</a>
{{/link-to}}
{{/each}}
</ul>
{{outlet}}
</script>
CSS
h1 { font-size: 1.6em; padding-bottom: 10px; }
h2 { font-size: 1.4em; }
ul { padding: 15px; font-size: 1.4em; color: green; }
JavaScript
App = Ember.Application.create({});
App.Router.map(function() {
this.route('post', { path: '/post/:post_id'});
});
App.ApplicationRoute = Ember.Route.extend({
model: function(){
return [{ title: 'foo' }, { title: 'bar'}];
}
});