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?
You need to include underscore.js
before backbone.js
as in this updated version of your fiddle:
http://jsfiddle.net/ambiguous/AFmQ2/1/
From the fine manual:
Backbone's only hard dependency is Underscore.js.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With