Redom Router
A simple Single Page Application Framework Built on the RE:DOM library.
installation
npm install redom-app
Getting Started
In your application entry point, add
/*some code*/const app = start
where default
is the default view if no other views are specified and each
key:value pair is the name of the route and the View class.
Each view looks like this
{ thisel = ; } { //Do whatever you want with the parameters }
Redirection
//some code here
Middleware
{ } //this is what the middleware method looks like { if//some condition here){ return 'other-view'// the view to redirect to. Stops execution of other middlewares }else return nextView } }/*in your entry point*/const app = start
More Examples
Examples can be found in here