# How to access parent(multiple levels) instance controller

**URL:** <https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514>\
**Category:** Design\
**Created:** [August 5, 2015, 2:55pm UTC](https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514 "2015-08-05T14:55:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gouthamvel](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/gouthamvel/32/10809_2.png) [@gouthamvel](https://discuss.emberjs.com/u/gouthamvel)\
**Post date:** [August 5, 2015, 2:55pm UTC](https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514/1 "2015-08-05T14:55:58Z")

</div>

Here’s the fiddle [Ember Starter Kit - JSFiddle - Code Playground](https://jsfiddle.net/gouthamvel/68wz1szo/1/)

I’m trying to access parent controller property using needs(same with Ember.inject.controller), but its not working out. I’m **assuming** since level 1 controller is an instance controller. needs is confused on which one to pick as many instances of level1 controller exist.

I can use parentController property but in my real problem the parent controller is multiple levels up the hierarchy so I will end up using alias at every level.

Does anyone know a better way to solve this issue ? please let me know.

---

<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 5, 2015, 4:04pm UTC](https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514/2 "2015-08-05T16:04:46Z")

</div>

> I’m assuming since level 1 controller is an instance controller. needs is confused on which one to pick as many instances of level1 controller exist.

Correct.

I wouldn’t use `render` or `ObjectController`, as `ObjectController` is deprecated and I imagine render would naturally be as well.

Here is what you are trying to achieve using components:

> **[JS Bin](http://jsbin.com/penowe/edit?html,js,output)**
>
> A live pastebin for HTML, CSS & JavaScript and a range of processors, including SCSS, CoffeeScript, Jade and more...

> I can use parentController property but in my real problem the parent controller is multiple levels up the hierarchy so I will end up using alias at every level.

Feel free to amend my example because I don’t think your example demonstrates this. In my update, are you concerned about passing parent as an attribute?

---

<div class="post-metadata">

**Author:** ![gouthamvel](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/gouthamvel/32/10809_2.png) [@gouthamvel](https://discuss.emberjs.com/u/gouthamvel)\
**Post date:** [August 5, 2015, 7:28pm UTC](https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514/3 "2015-08-05T19:28:06Z")

</div>

Thanks, for the new approach.

I think my problem can be solved using components. Do you think I should opt for component based design as much as possible? Is this where ember’s heading?

---

<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 5, 2015, 9:11pm UTC](https://discuss.emberjs.com/t/how-to-access-parent-multiple-levels-instance-controller/8514/4 "2015-08-05T21:11:30Z")

</div>

> [@gouthamvel](#):
>
> Do you think I should opt for component based design as much as possible? Is this where ember’s heading?

Yes, I recommend watching @ebryn’s talk on 2.0: [https://www.youtube.com/watch?v=U1HEzVWseng](https://www.youtube.com/watch?v=U1HEzVWseng)
