# Can't load controller in nested path

**URL:** https://meta.discourse.org/t/cant-load-controller-in-nested-path/195222
**Category:** Development
**Created:** [June 28, 2021, 11:29am UTC](https://meta.discourse.org/t/cant-load-controller-in-nested-path/195222 "2021-06-28T11:29:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Programer-D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/programer-d/32/215194_2.png) [@Programer-D](https://meta.discourse.org/u/Programer-D)
#### Post date: [June 28, 2021, 11:29am UTC](https://meta.discourse.org/t/cant-load-controller-in-nested-path/195222/1 "2021-06-28T11:29:24Z")

</div>

I want to create a nested page (path) in a plugin that I created myself, and a controller that is restricted to the scope of that particular nested page.  
I used this page from emberjs as a reference.

> **[Adding Nested Routes - Tutorial - Ember Guides](https://guides.emberjs.com/v2.14.0/tutorial/subroutes/)**
>
> Up to this point, we've generated four top level routes. 
> 
> \- An about route, that gives information on our application.
> \- A contact route, with information on how to contact the company.
> \- A rentals route, where we will allow users to browse...

```javascript
export default function () {
  this.route('root_path', {path: '/root_path'}, function () {
    this.route('test_nested', {path: '/test_nested'});
  });
}

```

At this time  
templates/root\_path/test\_nested.hbs  
at this time, and it loaded without any problem and was properly displayed in the outlet in root\_path.hbs.

The problem is the corresponding controller.  
I’ve created controllers/root\_path/test\_path.js.es6, but it doesn’t seem to be loading.  
(I have written the following code to test it)

**controllers/root\_path/test\_nested.js.es6**

```javascript
export default Ember.Controller.extend({
  test_num: 0
}

```

**templates/root\_path/test\_nested.hbs**

```plaintext
test
test_num:{{test_num}}

```

**routes/root\_path/test\_nested.js.es6**

```plaintext
I didn't write anything.

```

I thought that the place to put controller of test\_nested is wrong. I’ve tried several places, but they all don’t work.

It would be helpful if you could tell me the appropriate settings.  
If I can’t use a scoped controller, then I’d like to use a root\_path controller.  
(Not an ideal solution, though.)
