Skip to content

Instantly share code, notes, and snippets.

@MrMaksimize
Created June 7, 2011 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrMaksimize/1012364 to your computer and use it in GitHub Desktop.
Save MrMaksimize/1012364 to your computer and use it in GitHub Desktop.
SugarSkull router on Leave
apciMobile.Router = Router({
'/login': function () {
new apciMobile.loginPageView({
el: $('#content')
});
},
'/home': function(){
var gridView = new apciMobile.gridView({
el: $('#content'),
collection: apciMobile.grid
});
},//home
'/logout' : function (){
apciMobile.logout();
},//logout
'/groups' : {
on: function () {
var groupView = new apciMobile.groupsPageView({
el: $('#content'),
collection: apciMobile.userGroups
});
},
leave: function(){
console.log('LEAVING');
}
}
});//router
apciMobile.Router.init();
if (window.location.hash === ""){
apciMobile.Router.setRoute('/home');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment