Models won't load from store
by ppanagi
HTML
<script src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"></script>
<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.js"></script>
<script src="http://cloud.github.com/downloads/emberjs/data/ember-data-latest.js"></script>
<script type="text/x-handlebars" name="application">
<h1>I'm feeling lonely!</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" name="items">
<ul>
{{#each item in App.router.itemsController}}
<li>{{item.pluginName}}</li>
{{/each}}
</ul>
</script>
JavaScript
// This is the actual JS
App = Em.Application.create({
ApplicationController: Em.Controller.extend({}),
ApplicationView: Em.View.extend({
templateName: 'application'
}),
Router: Em.Router.extend({
enableLogging: true,
root: Ember.Route.extend({
home: Ember.Route.extend({
route: '/',
connectOutlets: function(router){
router.applicationController.connectOutlet({viewClass: App.ItemsView, controller: router.itemsController, context: App.Item.find()});
}
})
})
}),
Item: DS.Model.extend({
pluginName: DS.attr('string')
}),
Store: DS.Store.extend({
revision: 6,
adapter: DS.FixtureAdapter.create({
bulkCommit: false
})
}),
ItemsController: Em.ArrayController.extend({
}),
ItemsView: Ember.View.extend({
templateName: 'items'
}),
});
App.Item.FIXTURES = [
{id: 3, pluginName: 'text'},
{id: 4, pluginName: 'split'}
];