admin管理员组文章数量:1241150
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.
本文标签: javascriptquotBackboneModelextend() is not a functionquotwhat have I done wrongStack Overflow
版权声明:本文标题:javascript - "Backbone.Model.extend() is not a function", what have I done wrong? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740060444a2222581.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论