I'm learning ember and trying to use the guide to the main application template to display a list of items.
It's pretty simple so far. Here's what I've got:
app/routes/application.js
export default Ember.Route.extend({
model() {
return $.get('http://ift.tt/1or1gGJ');
}
});
app/templates/application.hbs
<ul>
{{#each controller as |item|}}
<li>{{item.name}}</li>
{{/each}}
</ul>
{{outlet}}
When the page loads, nothing is displayed even though I can see the http request was made.
I didn't create a controller because the ember doc states that my route should return an Ember.ArrayController.
Any ideas on what I'm missing here?
Aucun commentaire:
Enregistrer un commentaire