In my starter app I’m using the latest ember-cli, ember, with htmlbars. The handlebars dependency has been removed from my app.
I have the same issue whether I hash two models together or use a single model. That is that the only syntax I can get to work for the #each is {{#each model as |blah|}}. Can anyone explain why this is?
Route
route.js
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.find('employee'); } });
Model
model.js
import DS from 'ember-data';
export default DS.Model.extend({
firstName: DS.attr('string'),
lastName: DS.attr('string'), ....etc
Template
<tbody>
{{#each model as |employee|}}
<tr>
<td>{{employee.firstName}}</td>
<td>{{employee.lastName}}</td>
</tr>
{{/each}}
{{#each employee as |employee|}} or {{#each employees as |employee|}} make the table blank. It only works if I do each {{#each model as …}}.
I have the same thing if I hash together two models using the RSVP.hash.
Thoughts?