bbclonemail.routing.js | |
---|---|
Backbone.BBCloneMail A reference application for Backbone.Marionette Copyright (C)2012 Derick Bailey, Muted Solutions, LLC Distributed Under MIT License Documentation and Full License Available at: http://github.com/derickbailey/backbone.bbclonemail http://github.com/derickbailey/backbone.marionette | |
Routing | BBCloneMail.module("Routing", function(Routing, BBCloneMail, Backbone, Marionette, $, _){ |
Public API | |
The | Routing.showRoute = function(){
var route = getRoutePath(arguments);
Backbone.history.navigate(route, false);
}; |
Helper Methods | |
Creates a proper route based on the | var getRoutePath = function(routeParts){
var base = routeParts[0];
var length = routeParts.length;
var route = base;
if (length > 1){
for(var i = 1; i < length; i++) {
var arg = routeParts[i];
if (arg){
route = route + "/" + arg;
}
}
}
return route;
}
});
|