【发布时间】:2014-11-23 19:51:56
【问题描述】:
我的索引路由中有以下代码。如何限制返回的记录数?我在路由的 setupController 中设置了 this._super(controller, model)。
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return Ember.RSVP.hash({
articles: this.store.find('article'),
categories: this.store.find('category', {limit: 3})
});
},
setupController: function(controller, model) {
// No records are retrieved without this
this._super(controller, model);
}
});
【问题讨论】:
标签: ember.js