Sha256: ae836834c1bada23a7af90fde596f280c78350a5a587b1e627a2f3d5f9137df2
Contents?: true
Size: 587 Bytes
Versions: 10
Compression:
Stored size: 587 Bytes
Contents
querystring = require('querystring') Backbone = require('backbone') module.exports = class Router extends Backbone.Router routes: ':title' : 'show' '' : 'list' list: (string)-> location.hash = '/' if location.hash == '' console.log 'list' @current = 'list' @query = querystring.parse(string) console.log @query new: ()-> console.log 'new' @current = 'new' edit: (title)-> console.log 'edit', title @current = 'edit' @title = title show: (title)-> console.log 'show', title @current = 'show' @title = title
Version data entries
10 entries across 10 versions & 1 rubygems