【发布时间】:2018-04-13 09:36:37
【问题描述】:
所以我有这个模型的路线:
model() {
var self = this;
return RSVP.hash({
comptes : this.get('store').findAll('compte'),
contrats:
this.get('store').findAll('contrat').then(function(contrats) {
return contrats.filterBy("contrat_fk.id",
self.get('currentContract.contrat.id'));
}),
})
}
我的目标是使用我的服务 currentContract 提供的值过滤模型合同。
页面重新加载时效果很好,但是当我更改路线并返回此路线时,模型似乎没有加载,我必须重新加载页面才能看到它。
而且我真的不想使用查询参数并将合同 ID 放在 URL 中
【问题讨论】:
标签: ember.js ember-data ember-cli query-parameters