Closed bweston92 closed 7 years ago
This is because Container
's prototype has a constructor
method, which in JavaScript is usually the function that the prototype is attached to:
> x = new Function()
[Function]
> x.prototype.constructor == x
true
CoffeeScript expects all classes to behave this way, so to extend, you have to do it the old way:
Container = require('electrolyte').Container
class App
# Set up the new prototype object
@prototype = Object.create(Container.prototype)
constructor: ->
# Call super
Container.call(this)
How would I go about getting the following to work. At the minute @create doesn't exist even though I'm extending the container instance. Any ideas?