# Accessing another routes model

**URL:** <https://discuss.emberjs.com/t/accessing-another-routes-model/11379>\
**Category:** Uncategorized\
**Created:** [August 12, 2016, 2:33am UTC](https://discuss.emberjs.com/t/accessing-another-routes-model/11379 "2016-08-12T02:33:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ob7](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ob7/32/12515_2.png) [@ob7](https://discuss.emberjs.com/u/ob7)\
**Post date:** [August 12, 2016, 2:33am UTC](https://discuss.emberjs.com/t/accessing-another-routes-model/11379/1 "2016-08-12T02:33:48Z")

</div>

I have data stored in one route that I would like to get from another route. How can I do this?

---

<div class="post-metadata">

**Author:** ![ob7](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ob7/32/12515_2.png) [@ob7](https://discuss.emberjs.com/u/ob7)\
**Post date:** [August 12, 2016, 4:13am UTC](https://discuss.emberjs.com/t/accessing-another-routes-model/11379/2 "2016-08-12T04:13:59Z")

</div>

Perphap the correct way to do this is not call another routes model, but rather grab the data from the same place from both routes? Such as ember data. For this case I just passed a json file according to this basic tutorial: [https://www.codehive.io/boards/FwcMLRY](https://www.codehive.io/boards/FwcMLRY)

---

<div class="post-metadata">

**Author:** ![atimberlake](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/atimberlake/32/11753_2.png) [@atimberlake](https://discuss.emberjs.com/u/atimberlake)\
**Post date:** [August 12, 2016, 7:32am UTC](https://discuss.emberjs.com/t/accessing-another-routes-model/11379/3 "2016-08-12T07:32:24Z")

</div>

If the one route is a sub route of the other then you can use `modelFor` In /routeA/routeB you can use `this.modelFor('routeA')` to get the model from the parent route. If you’re not talking about the model, then I suggest using a service where one route can place the data in the service and the other route can access that data from the service.

---

<div class="post-metadata">

**Author:** ![jasonmit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jasonmit/32/182_2.png) [@jasonmit](https://discuss.emberjs.com/u/jasonmit)\
**Post date:** [August 12, 2016, 9:43am UTC](https://discuss.emberjs.com/t/accessing-another-routes-model/11379/4 "2016-08-12T09:43:13Z")

</div>

`this.modelFor('route-name-here')` I typically only use with a parent route that I know would have resolved before the child. Otherwise, use something like ember-data or ember-simple-store.
