backbone.js - Object [object Object] has no method 'on' -


I am very new to the spinal cord and I'm studying, to follow her example to create a todo list for. I can not understand why this code does not work:

  var Todo = Backbone.Model.extend ({default: {title: "", completed: false}, start: function () {Console.log ("model started"); this.on ("change", function () {console.log ("values ​​for this model have changed.");});}}) ; Var todo1 = new Todo ();   

The library I have added is jQuery, underscore and backbone. What's wrong with this? Why ".on" is not available? Thanks

on only included in backbone 0.9.0. You need to update it.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -