1.0.4 • Published 4 years ago
client-hash v1.0.4
Hash Router
Client side routing with a hash Router
Features
- Lightweight
- Easy use
Usage
Start by defining a new App()
. Apps take on parameter, the wrapper or target where page content should be rendered.
const app= new App(document.getElementById('app'))
You can then add routes using get
, similar to Express on a server.
app.get('page', () => {
// Return page content to be rendered
})
Lastly, start the app with app.start()