I am having a crack at Backbone and decided to open a jsFiddle to play around.
Unfortunately, I keep getting this error being thrown:
Backbone.Model.extend is not a function
My code:
var Model = Backbone.Model.extend();
I got this piece of code from a Backbone tutorial.
The fiddle.
What have I done wrong?
I am having a crack at Backbone and decided to open a jsFiddle to play around.
Unfortunately, I keep getting this error being thrown:
Backbone.Model.extend is not a function
My code:
var Model = Backbone.Model.extend();
I got this piece of code from a Backbone tutorial.
The fiddle.
What have I done wrong?
Share Improve this question asked Sep 22, 2011 at 1:07 bundybundy 1211 silver badge7 bronze badges1 Answer
Reset to default 19You need to include underscore.js
before backbone.js
as in this updated version of your fiddle:
http://jsfiddle/ambiguous/AFmQ2/1/
From the fine manual:
Backbone's only hard dependency is Underscore.js.