I’m new to the javascript world, so don’t hesitate to point out the obvious.
I was trying to create a jsfiddle to ask a question on how to insert some content in the div element created by the App.Column view.
However I failed to get the fiddle to work, anyone who can point out why my errors?
The console logs this: Uncaught TypeError: Cannot call method ‘extend’ of undefined
Here is the fiddle: http://jsfiddle.net/Aqrrj/2/
The JQueryUI-widget is taken from https://github.com/lukemelia/jquery-ui-ember and there is also a working example which I started from.
cheers
There are 2 problems:
By creating an application and assigning it to
var App = Ember.Application.create()your are not making it available on the global object. Removing thevarmakesAppglobal and therefore usable in your Handlebars template.Second you are referring to a view class
App.Columnbut it is never declared in your JavaScript code.So your example can be fixed by the following lines, see http://jsfiddle.net/pangratz666/pSKgV/: