Created
December 18, 2012 21:30
-
-
Save timrwood/4332199 to your computer and use it in GitHub Desktop.
router.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"rosy/views/Router", | |
"mysite/views/Home", | |
"mysite/views/About", | |
"mysite/views/Contact" | |
], | |
function (Router, Home, About, Contact) { | |
var group = new Router({ | |
id : "main", | |
selector : "#main", | |
useHistory : true, | |
transition : "async" | |
}); | |
group.addRoute('/home', Home, { | |
bodyClass : "home", | |
title : "Home" | |
}); | |
group.addRoute('/about', About, { | |
bodyClass : "about", | |
title : "About My Site" | |
}); | |
group.addRoute('/contact', Contact, { | |
bodyClass : "contact", | |
title : "Contact Me" | |
}); | |
group.addAlias('/', '/home'); | |
return group; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment