3.0.0 • Published 8 years ago

router5-persistent-params v3.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

npm version Build Status

router-persistent-params

Persistent route parameters plugin for router5.

You just have to pass to the plugin an array of persistent parameters, and those parameters will be added to any route as query parameters (using their last known value). Note: if you use # in your routes, they are not "true" query parameters.

For now, only query parameters are supported. It works by modifying the path of the root node of your tree of routes (by default the root node path is ''). If you need support for other types of parameters, please raise an issue to discuss it.

import persistentParamsPlugin from 'router5-persistent-params';

const router = new Router5()
    .usePlugin(persistentParamsPlugin(['mode']));
    
// Or

const router = new Router5()
    .usePlugin(persistentParamsPlugin({ 'mode': 'debug' }));
3.0.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago