Question

I have a template templates/articles.hbs with the code:

{{view "carousel"}}

The above statement must be correct, as it is stated in the Getting Started: https://github.com/stefanpenner/ember-app-kit/wiki/Getting-Started#resolving-from-template-helpers

At views/carousel.js the simple code:

var CarouselView = Ember.View.extend({    
    classNames: ['carousel']
});
export default CarouselView;

This causes however the following error:

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 () 

I have tried to add carousel.js to views/articles/carousel.js. I have tried different {{view}} names such ass App.CarouselView etc, but that all does not work.

What are I am missing here guys?

Était-ce utile?

La solution

In the guides it says you have to pass a view class to the view helper, so does the error message. The wiki might be outdated.

Also I think you've mistakenly defined var CarouselView = instead of App.CarouselView = ...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top