1
我试图改变我的意见,当模型属性发生变化 林不知道我是否在正确的轨道上,但在这里。在子路径中过滤RecordArray以返回RecordArray?
我有叫午餐父资源,其路径看起来像这样:
model: function(params){
return this.store.filter('lunch', params, this.funcAll);
}
,我有一个孩子的路线“服务”,其路径看起来像这样:
model: function(params){
return this.modelFor('lunches').filterProperty('isServed', true);
// as opposed to this.store.filter('lunch', this.funcFilter()})
}
当我在子路径中使用过滤器,我能够做到这一点(我认为是因为一个过滤器返回一个RecordArray),但这不适用于我,另一个原因。无论如何,我可以让我的子路线返回一个RecordArray,它是原始模型的一个子集?
非常感谢主销!我发现我犯的错误很多。但是,多亏了你,我已经明白了这一点。 – user3874510