Created
May 29, 2012 23:24
-
-
Save quangv/2831434 to your computer and use it in GitHub Desktop.
Simple Multiple functions to map to same route Spine.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main extends Spine.Controllers | |
constructor : -> | |
super | |
@routes | |
'/app*glob' : -> | |
# do something | |
module.exports = new Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Side extends Spine.Controllers | |
constructor : -> | |
super | |
@routes | |
'/app*glob' : -> | |
# do something | |
module.exports = new Side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App extends Spine.Controllers | |
constructor : | |
@main = require 'controllers_main' | |
@side = require 'controllers_side' | |
$ -> | |
window.app = new App | |
Spine.Route.setup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment