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.
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
export default Ember.Controller.extend({
test_num: 0
}
templates/root_path/test_nested.hbs
test
test_num:{{test_num}}
routes/root_path/test_nested.js.es6
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.)