Skip to content

Instantly share code, notes, and snippets.

@think2011
Created April 9, 2015 12:48
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 think2011/8cccc762104fc39f1cf8 to your computer and use it in GitHub Desktop.
Save think2011/8cccc762104fc39f1cf8 to your computer and use it in GitHub Desktop.
window.getRouteParams = function () {
var params = [],
routes = (window.location.pathname).split('/');
for(var i = 0; i < routes.length; i++) {
if(routes[i]) params.push(routes[i]);
}
return params;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment