我有一个Handlebars帮助程序,它返回一个ContainerView,它具有一些用于自动生成表单的复杂逻辑。在Ember 1.8之前,这个帮助程序工作正常,但现在我得到了这个断言错误:
Assertion Failed: <(subclass of Ember.ContainerView):ember406> must be a subclass of Ember.View, not <(subclass of Ember.ContainerView):ember406>
这是助手本身:
Ember.Handlebars.registerBoundHelper('render-form', function(form_name, options) {
// FF is a library that generates the ContainerView
var form = new FF.Form(form_name),
// View contains the result of Ember.ContainerView.extend({...}).create()
view = form.getView();
return Ember.Handlebars.helpers.view.call(this, view, options);
});
Ember 1.8已弃用对全局视图查找的支持,但仍支持通过绑定获取视图。有谁知道如何调用视图助手,以便呈现ContainerView?