bigbluebutton-Github/labs/html5-embed/public/js/router.js

34 lines
915 B
JavaScript
Raw Normal View History

2012-10-26 05:12:21 +08:00
// Filename: router.js
define([
'jquery',
'underscore',
'backbone'
], function($, _, Backbone ){
var AppRouter = Backbone.Router.extend({
routes: {
// Default. We only have one route.
'*actions': 'defaultAction'
}
});
var initialize = function(){
var app_router = new AppRouter;
app_router.on('route:defaultAction', function (actions) {
require(['views/users/list'], function(UsersView) {
console.log("Opening users view");
2012-10-26 05:12:21 +08:00
// We have no matching route, lets display the home page
// var usersView = UsersView;
// UsersView.render();
2012-10-26 05:12:21 +08:00
});
// require(['views/flash/client'], function(FlashClientView) {
// console.log("Opening main view");
// var flashClientView = new FlashClientView();
// flashClientView.render();
// });
2012-10-26 05:12:21 +08:00
});
Backbone.history.start();
};
return {
initialize: initialize
};
});