summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/router.js
blob: d5b9652f94f71702c7a5454fd059346c04524a95 (plain)
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
var lobby, room

var SiteRouter = Router.extend({

	el: "body",
	
	routes: {
		"/":            'login',
		"/index":       'index',
		"/login":       'login',
		"/details/:id": 'details',
	},
	
	initialize: function(){
    this.route()
  },
  
  index: function(){
    app.view = new IndexView ()
  },
  
  login: function(){
    app.view = new LoginView ()
  },
  
  details: function(id){
    app.view = new DetailsView ()
    app.view.load(id)
  }

})