KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
With ember-data I'm loading all records of a model with: App.adapter = DS.Adapter.create({ findAll: function(store, type) { var url = type.url; jQuery.getJSON(url, function(data) { var ids = data.map(function(item, index, self){ return item.id }); store.loadMany(type, ids, data); }); } }); The didLoad method is called when each of the record has finished loading. Is there a method to call when all records have finished loading? EDIT Model: App.Article = DS.Model.extend({ title: DS.attr('string'), content: DS.attr('string'), checkIsLoaded: function() { if (this.get('isLoaded')){ console.log('loaded!'); // outputs `loaded` for each record } }.observes('isLoaded') });
Tags (comma-separated)
Save Edits
Cancel