我有一个带有代码的模板templates/articles.hbs:
{{view "carousel"}}
上面的说法一定是正确的,正如入门中所说:https ://github.com/stefanpenner/ember-app-kit/wiki/Getting-Started#resolving-from-template-helpers
在views/carousel.js中的简单代码:
var CarouselView = Ember.View.extend({
classNames: ['carousel']
});
export default CarouselView;
然而,这会导致以下错误:
Assertion failed: Unable to find view at path 'carousel' ember.js:3231
Assertion failed: You must pass a view to the #view helper, not carousel ()
我尝试将 carousel.js 添加到 views/articles/carousel.js。我尝试了不同的{{view}}
名称,例如 App.CarouselView 等,但这一切都不起作用。
伙计们,我在这里缺少什么?