Very new to ember and trying to mess around with my first test script. I keep getting the error in the title and it occurs when I try to use handlebars to loop through a data fixture. Any help would be appreciated, thank you!
Loop statement that is giving error
{{#each player in controller}}
<tr> <!-- foreach statement here order by wins>loss>ties -->
<td>{{ name }}</td>
</tr>
{{/each}}
App.JS
var App = Ember.Application.create({
LOG_TRANSITIONS: true,
});
// Router
App.Router.map(function(){});
App.PlayersRoute = Ember.Route.extend({
model: function(){
return App.Player.find();
}
});
// Controllers
App.PlayersController = Ember.ArrayController.extend();
// View Helpers
// Models
App.Store = DS.Store.extend({
revision: 11,
adapter: 'DS.FixtureAdapter'
});
App.Player = DS.Model.extend({
name: DS.attr('string'),
wins: DS.attr('number'),
losses: DS.attr('number'),
ties: DS.attr('number'),
drop: DS.attr('boolean')
});
App.Player.FIXTURES = [{
id: 1,
name: 'Joe Jame',
wins: 2,
losses: 0,
ties: 0,
drop: 'False'
}, {
id: 2,
name: 'Froggy Bottom',
wins: 2,
losses: 0,
ties: 0,
drop: 'False'
}];