# 在 Ember 中访问另一个模型--肯定有比 ajax 更好的方法

**URL:** <https://meta.discourse.org/t/accessing-another-model-in-ember-surely-theres-a-better-way-than-ajax/216695>\
**Category:** Development\
**Created:** [2022 年2 月 1 日 14:23 UTC](https://meta.discourse.org/t/accessing-another-model-in-ember-surely-theres-a-better-way-than-ajax/216695 "2022-02-01T14:23:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2022 年2 月 1 日 19:49 UTC](https://meta.discourse.org/t/accessing-another-model-in-ember-surely-theres-a-better-way-than-ajax/216695/3 "2022-02-01T19:49:01Z")

</div>

Hmm. 仔细查看 `groups.js` 的功能，它似乎和我正在做的几乎是相同的 json 调用，更糟糕的是，我似乎需要用到的 `Group.findAll()` 来使用 `Group.addMembers` 会增加一个额外的 `ajax` 调用，而我目前正在避免它。也许我的代码不像我想的那么糟糕！

谢谢！

---

_[View the full topic](https://meta.discourse.org/t/accessing-another-model-in-ember-surely-theres-a-better-way-than-ajax/216695)._
