Ember-Data callback when findAll finished loading all records
ember-data, ember.js
Solution
Yes, you can use `findQuery`, and then observe `.isLoaded` property on the `ModelArray`.
e.g:
load: ->
@set 'data', @get('store').findQuery App.MyModel, { q: '...' }
And have the observation:
loadingComplete: ( ->
@doSomeStuff() if @getPath 'data.isLoaded'
).observes 'data.isLoaded'
Problem
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') }); ```