Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. this.options = someObj;
  2. this.collection.each(this.trainNav, this);
  3.  
  4. trainNav: function (model) {
  5. model.set({ feature: this.options.feature });
  6. new Views.TrainNavItem ({ el: '#train-nav', model: model });
  7. },
  8.  
  9. Cannot read property 'options' of undefined
  10.  
  11. this.options = someObj;
  12. this.collection.each(this.trainNav(this));
  13.  
  14. trainNav: function(context){
  15. return function (model) {
  16. model.set({ feature: context.options.feature });
  17. new Views.TrainNavItem ({ el: '#train-nav', model: model });
  18. }
  19. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement