S
S
Stepan2014-09-26 12:00:02
JavaScript
Stepan, 2014-09-26 12:00:02

Why don't backbone and coffescript work?

class Person extends Backbone.model
  defaults
    name:'Nick'
    age:24
    job: 'Front-end developer'

person = new Person
  name: 'Andrey'
  age: 27

console.log person

Error in browser
Uncaught TypeError: Cannot read property 'prototype' of undefined

I googled that the parent is not defined in __extends, in this case it is _super
How to define it in coffee?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan, 2014-09-26
@xoma2

The error turned out to be the most banal my _super (parent) is model.
I wrote model with a small letter.
inattention

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question