lib/carte/client/router.coffee in carte-server-1.0.0 vs lib/carte/client/router.coffee in carte-server-1.0.1

- old
+ new

@@ -1,12 +1,13 @@ querystring = require('querystring') Backbone = require('backbone') module.exports = class Router extends Backbone.Router routes: - ':title' : 'show' - '' : 'list' + '': 'list' + 'slideshow': 'slideshow' + ':title': 'show' list: (string)-> console.log '[router] list', string location.hash = '/' if location.hash == '' @current = 'list' @@ -14,5 +15,10 @@ show: (title)-> console.log '[router] show', title @current = 'show' @title = title + + slideshow: (string)-> + console.log 'slideshow', string + @current = 'slideshow' + @query = querystring.parse(string)