2

我想我已经准备好了一切。但是我不能在支付控制器中使用 `needs: ['shipping', 'checkout'] 因为它们根本找不到,请参阅此错误:

Error while loading route: Error: <appkit@controller:article/payment::ember1670> needs [ controller:checkout, controller:shipping ] but they could not be found

有趣的是,我之前访问过这些路线,因为这是我结帐过程的一部分。看一下路由器:

    this.resource('articles', {path: '/product'}, function() { // to fill the articles navigation slider
        this.resource('article', {path: '/:article_id'}, function() { // article information slider
            // (...)
            // we have always an active article, thats why the shipping is underneath 'article'
            this.route('shipping', {path: '/verzending'});
            this.route('checkout', {path: '/betaalwijze'});
            this.route('payment', {path: '/afrekenen'});
        });
    });

所以我访问:shipping然后checkout然后payment得到错误。这些控制器都是 ObjectController。

文件夹结构:

文件夹结构

在运输控制器中,我使用needs了一个可以工作的 ArrayController。也许它必须那些是ObjectControllers?

提前感谢您的任何提示!

编辑:使它们Ember.Controller没有任何效果。

4

1 回答 1

1

看到这个问题:Observs other childcontroller?

ObjectController 的状态似乎不会长久。

于 2014-03-28T08:15:41.307 回答