# How get model in controller?

**URL:** <https://discuss.emberjs.com/t/how-get-model-in-controller/10816>\
**Category:** Uncategorized\
**Created:** [June 1, 2016, 7:36am UTC](https://discuss.emberjs.com/t/how-get-model-in-controller/10816 "2016-06-01T07:36:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [June 1, 2016, 7:36am UTC](https://discuss.emberjs.com/t/how-get-model-in-controller/10816/1 "2016-06-01T07:36:24Z")

</div>

Hi there! I have model with some props.  
name: DS.attr(),  
description: DS.attr(),  
stats: DS.attr(),  
someValue: Ember.computed(‘stats’, function() { return data })

But, how i can get in controller property ‘someValue’ ?

---

<div class="post-metadata">

**Author:** ![zoltan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zoltan/32/16699_2.png) [@zoltan](https://discuss.emberjs.com/u/zoltan)\
**Post date:** [June 2, 2016, 9:24am UTC](https://discuss.emberjs.com/t/how-get-model-in-controller/10816/2 "2016-06-02T09:24:45Z")

</div>

Hey Jobsboris, it is a good start, but a Ember works a little bit differently. You can learn all the basics from this tutorial [http://yoember.com](http://yoember.com) or form the official guide: [https://guides.emberjs.com/v2.5.0/tutorial/ember-cli/](https://guides.emberjs.com/v2.5.0/tutorial/ember-cli/)

Basically, you have the model, with name, description and stats, but you need a route also, where you download data from your server (from a backend) and that route will provide data (a model property) for you in your template. Follow through those tutorials, and everything will be more clearer and super simple after. Have a great learning.

---

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [June 2, 2016, 9:38am UTC](https://discuss.emberjs.com/t/how-get-model-in-controller/10816/3 "2016-06-02T09:38:57Z")

</div>

Thanks! I can link model and controller using a template by using the action.

---

<div class="post-metadata">

**Author:** ![solex16](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@solex16](https://discuss.emberjs.com/u/solex16)\
**Post date:** [June 8, 2016, 2:18pm UTC](https://discuss.emberjs.com/t/how-get-model-in-controller/10816/4 "2016-06-08T14:18:24Z")

</div>

I struggled with this for a while…

In my item router I have

```
model: function(params) {
 return this.store.fetchById('item', params.item_id);
},

```

My item model is something like:

```
size: DS.attr('string'),
colour: DS.attr('string'),

```

Then in my item controller, I have

`itemColour: Ember.computed.alias("model.colour"),`

So I now have the colour property of the model available in the controller…

Hope that helps…
