ember-cli / pod:嵌套resources/templates

ember-cli / pod: Nesting resources/templates

我已经阅读了各种 Whosebug 线程和其他论坛条目,但我无法弄清楚如何使用 ember-cli 0.1.12 嵌套 resources/templates 工作pod 结构。

版本:

我的router.js(未更改,cli 创建它,仅用于演示目的):

Router.map(function() {
    this.resource("controls", function() {
    this.route("statements");
    this.resource("handles", function() {});
});

情况:

我试过了:

我觉得我在这里缺少一个基本点。 你能帮帮我吗?

谢谢, 曼纽尔

我无法解决 pod 问题,但可以尝试其他问题。 您的嵌套资源的性质是什么?

我希望这样的 URL:“..controls/:control_id/handles”。

我会这样写:

this.resource('controls', function() {
  this.route('statements');
  this.route('show', { path: ':control_id' }, function() {
    this.resource('handles', function() {
    });
  });
});

尼克