Skip to content

Instantly share code, notes, and snippets.

View quangv's full-sized avatar
💭
github needs a night mode

Quang Van quangv

💭
github needs a night mode
View GitHub Profile
@quangv
quangv / content.coffee
Created June 6, 2012 23:48 — forked from stephenvisser/content.coffee
Controller-scoped routes using Spine.js
require('spine/lib/manager')
class Main extends Spine.Stack
routes:
'adventure': 'adv'
'home': 'home'
'information': 'info'
controllers:
info: Information
home: Home
@quangv
quangv / controllers-main.coffee
Created May 30, 2012 16:06
Proposal: Ability to fire routes additions if necessary Spine.js
class Main extends Spine.Controller
constructor : ->
super
@routes { # called after init routes have been loaded, manual trigger needed if path match.
'/app/main' : ->
# do stuff
}, trigger:true
module.exports = Main
@quangv
quangv / controllers_main.coffee
Created May 29, 2012 23:24
Simple Multiple functions to map to same route Spine.js
class Main extends Spine.Controllers
constructor : ->
super
@routes
'/app*glob' : ->
# do something
module.exports = new Main