From c273cadba219ed954af7d2076e2c32e00b38ad03 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 11 Sep 2015 17:03:42 -0400 Subject: sketch out html based on mock --- StoneIsland/www/js/vendor/view/router.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js') diff --git a/StoneIsland/www/js/vendor/view/router.js b/StoneIsland/www/js/vendor/view/router.js index 36f86b5d..82cf9e12 100644 --- a/StoneIsland/www/js/vendor/view/router.js +++ b/StoneIsland/www/js/vendor/view/router.js @@ -1,12 +1,16 @@ var Router = View.extend({ + routeByHash: false, + go: function(url){ this.parseRoute(url) }, route: function(){ - this.originalPath = window.location.pathname - this.parseRoute(window.location.pathname) + var path = this.routeByHash ? window.location.hash.substr(0) : window.location.pathname + path = path || "/" + this.originalPath = path + this.parseRoute(path) }, parseRoute: function(pathname){ -- cgit v1.2.3-70-g09d2