Skip to content

Instantly share code, notes, and snippets.

@dipzera
dipzera / Router.js
Created June 15, 2020 11:59 — forked from ksafranski/Router.js
Simple hash-based router with :params and 404
// Router object
var Router = function () {
var self = this;
// Watch hashchange
window.onhashchange = function () {
self.process();
};
// Run on load