Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Persistent route parameters plugin for router5 [DEPRECATED]

License

Notifications You must be signed in to change notification settings

router5/router5-persistent-params

Repository files navigation

npm version Build Status

[DEPRECATED] router5-persistent-params

From version 4 and above of router5, this module is no longer needed and code has been moved to router5 main repo. Refer to http://router5.github.io/docs/migration-4.html for more details.

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' }));

About

Persistent route parameters plugin for router5 [DEPRECATED]

Resources

License

Stars

Watchers

Forks

Packages

No packages published