Created
June 15, 2016 19:07
-
-
Save ericorruption/82dbcc40fb5d3c3e1d309c2b71988517 to your computer and use it in GitHub Desktop.
very barebones router to load specific es6 modules when the page loads.
This file contains 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
'use strict'; | |
const path = location.pathname; | |
function initialize() { | |
switch(path) { | |
case 'path': | |
// load module here | |
break; | |
} | |
} | |
const router = { initialize }; | |
export default router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment