Skip to content

Commit

Permalink
Using findAll for downloading model asynchronously.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan-nz committed Jul 10, 2015
1 parent eba145c commit cc4955e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions app/routes/index.js
Expand Up @@ -3,8 +3,6 @@ import Ember from 'ember';
export default Ember.Route.extend({

model() {

return this.store.find('contact');

return this.store.findAll('contact');
}
});
4 changes: 4 additions & 0 deletions app/templates/contacts.hbs
Expand Up @@ -32,7 +32,11 @@
</td>
</tr>
{{else}}
{{#if model.isUpdating}}
<tr><td colspan="5" class="text-center">Data is downloading...</td></tr>
{{else}}
<tr><td colspan="5" class="text-center">Please add your first contact to the list</td></tr>
{{/if}}
{{/each}}
</tbody>
</table>

0 comments on commit cc4955e

Please sign in to comment.