Jump to content

jimfog

Recommended Posts

I am using this tutorial here http://blog.shinetech.com/2011/08/05/building-a-shared-calendar-with-backbone-js-and-fullcalendar-a-step-by-step-tutorial/ to make a calendar using backbone.

 

The calendar is rendered via backbone with a function(see paragraph Bringing in Backbone code line 15).

 

The problem is that the calendar is not displayed/rendered.

Checking with the chrome devtools console I saw the following error:

 

Uncaught TypeError: Cannot call method 'each' of undefined

 

It refers to backbone-min.js and to this code here

 h.each(_, function(t) {        v.prototype[t] = function(e, i) {            var r = h.isFunction(e) ? e : function(t) {                return t.get(e)            };            return h[t](this.models, r, i)        }    });

Why that happens? I have not the slightest idea.

What could be possible wrong here?

Link to comment
Share on other sites

You need to figure out which line of your own code is making that happen. The debugger should allow you to see the call stack somehow when the error occurs. You used a feature of that library and passed it an undefined value somewhere.

Link to comment
Share on other sites

The problem was that I had not included underscore.js.

Link to comment
Share on other sites

The problem was that I had not included underscore.js.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...