public
Last active

index.js.coffee

  • Download Gist
gistfile1.coffee
CoffeeScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
class App extends Spine.Controller
 
constructor: ->
super
new Spine.SubStack
Spine.Route.setup()
 
@append(@rooms = new App.Rooms)
@append(@messages = new App.Messages)
 
class App.Root extends Spine.Stack
controllers:
messages: App.Messages
rooms: App.Rooms
 
routes:
'/messages' : 'messages'
'/rooms' : 'rooms'
 
default: 'messages'
className: 'stack rooms'
 
class Spine.SubStack extends Spine.Stack
 
constructor: ->
console.log "HERE"
for key,value of @routes
do (key,value) =>
@routes[key] = =>
@active()
@[value].active(arguments...)
super
 
window.App = App

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.