reefjs-browser-router
v1.0.2
Published
Router for reefjs extracted from reefjs with dependencies removed/encapsulated internally.
Downloads
2
Readme
Router Extracted From Reefjs
Router for reefjs extracted from reefjs with dependencies removed/encapsulated internally.
//router module
import Router from 'reefjs-browser-router';
const router = new Router({
routes: [
{id: 100, title: '', url: ''}
...
]
});
export default router;
//app module
import Reef from 'reefjs';
//import from router file or import from reefjs-browser-router and define router here
import router from './router';
const app = new Reef('#app-container-id', {
store: ...,
router: router,
template: function(self, route){/* go crazy */}
})