# Possible to make model available across multiple routes?

**URL:** <https://discuss.emberjs.com/t/possible-to-make-model-available-across-multiple-routes/7277>\
**Category:** Ember CLI\
**Created:** [February 9, 2015, 1:55pm UTC](https://discuss.emberjs.com/t/possible-to-make-model-available-across-multiple-routes/7277 "2015-02-09T13:55:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianmbutler](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@brianmbutler](https://discuss.emberjs.com/u/brianmbutler)\
**Post date:** [February 9, 2015, 1:55pm UTC](https://discuss.emberjs.com/t/possible-to-make-model-available-across-multiple-routes/7277/1 "2015-02-09T13:55:18Z")

</div>

I’m a beginner, still learning Ember. I’m currently using Ember 1.10 and ember-cli 0.1.12 (latest). I also am currently using firebase. I apologize if this question would be more appropriate for stack overflow.

Right now my app works, but I thought maybe there would be a more elegant way of doing things.

I have a simple model:

```
/models/employee.js

import DS from 'ember-data';

export default DS.Model.extend({
   firstName: DS.attr('string'),
   lastName: DS.attr('string') ...

```

I have some routes as pods which are:

```
/pods/employee-form
/pods/employee-list

```

Now, I can push data onto the model in employee-form.hbs, that’s fine. The trouble is that I can’t seem to pull the data for /pods/employee-list unless I create another router file.

So, I can

```
/pods/employee-list/route.js

 import Ember from 'ember';
 export default Ember.Route.extend({

  model() {
    return this.store.findAll('employee');
}
});

```

or I can put that some information into

```
/routes/employee-list.js

```

But isn’t there a way to make that same model available to all routes? When I try the store.find method on a route for index.js the data isn’t available?

I’ve tried adding the store.find on a controller as well with no luck.

Also - When I make the data available by setting the model on the route, in my htmlbars template I can’t seem to access the collection unless I state model:

```
 {{#each employees as |employee|}}
  {{employee.firstName}}  
...
{{/each}}

```

does not work

```
{{#each model as |employee|}}
{{employee.firstName}}
...
{{/each}}

```

works

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [February 9, 2015, 7:05pm UTC](https://discuss.emberjs.com/t/possible-to-make-model-available-across-multiple-routes/7277/2 "2015-02-09T19:05:19Z")

</div>

You can do this in afterModel:

> <https://github.com/broerse/ember-cli-blog/blob/master/app/routes/posts.js>

---

<div class="post-metadata">

**Author:** ![brianmbutler](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@brianmbutler](https://discuss.emberjs.com/u/brianmbutler)\
**Post date:** [February 11, 2015, 1:41pm UTC](https://discuss.emberjs.com/t/possible-to-make-model-available-across-multiple-routes/7277/3 "2015-02-11T13:41:40Z")

</div>

I will try that, thank you. I probably need to read the docs more closely to understand the interaction of models, controllers, and routes.
