rlopez4 / multi-page-router

Multi page routing (i.e. non SPA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi Page Router

Routing for non single page applications or applications that don't need history. Multi page router allows you to call a set of functions on page load using express style path strings (e.g. /foo/:bar).

Heavily inspired by page.js

Usage

multiPageRouter({
  'foo' : [cb1, cb2],
  'foo/:bar' : cb,
  '*' : [cb1, cb3]
})

About

Multi page routing (i.e. non SPA)


Languages

Language:JavaScript 95.0%Language:HTML 5.0%