Error in inclusion of Ember View, says its not a class of View

36 Views Asked by At

I am trying to display a view using ember, emblem, and ember-cli. Seems like this is a no brainer and while I'm new to Ember I cannot seem to get this working:

DEBUG: -------------------------------
DEBUG: Ember      : 1.8.1
DEBUG: Ember Data : 1.0.0-beta.12
DEBUG: Handlebars : 1.3.0
DEBUG: jQuery     : 1.11.1
DEBUG: -------------------------------

Ember View:

`import Ember from 'ember'`

CalloutView = Ember.View.extend(
  templateName: 'callout'
  )
`export default CalloutView`

Emblem Template:

h1 Test Content

Emblem Index Template:

CalloutView

Error from Console:

enter image description here I'm using the Ember generator to create this view...I must be missing something.

1

There are 1 best solutions below

0
On

The Emblem documentation hasn’t been updated for Ember 1.8, though there’s a pull request documenting this. Including a view has changed. Try this, assuming your view lives at app/views/callout.coffeescript:

=view 'callout'

I tried it in an ember-cli application and it worked.