# Attach a controller to route from a different namespace

**URL:** <https://discuss.emberjs.com/t/attach-a-controller-to-route-from-a-different-namespace/2173>\
**Category:** Design\
**Created:** [August 15, 2013, 8:28pm UTC](https://discuss.emberjs.com/t/attach-a-controller-to-route-from-a-different-namespace/2173 "2013-08-15T20:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_Andrew\_Hu](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jun_andrew_hu/32/224_2.png) [@Jun\_Andrew\_Hu](https://discuss.emberjs.com/u/Jun_Andrew_Hu)\
**Post date:** [August 15, 2013, 8:28pm UTC](https://discuss.emberjs.com/t/attach-a-controller-to-route-from-a-different-namespace/2173/1 "2013-08-15T20:28:13Z")

</div>

Can I attach a controller from a different namespace to a route?

E.g., I want to do -

```
Common.SomeController = Ember.Controller...

App.SomeRoute = Ember.Route.extend({
   renderTemplate: function() {
      this.render('sometemplate', {controller : 'Common.SomeController'});
   }
});
```

Is there any way to do this?

Basically the problem I am trying to solve is that we will have multiple “Single Page Applications” in the app depending on the rails route and I want to share controller code among them.

Thanks!
