router5-listeners
Listeners plugin for router5@2.0.0.
How to install
The dist
folder contains:
- AMD bundled (with minifed version) named
router5ListenersPlugin
- Browser module-less bundle (with minified version) adding to the globals
router5ListenersPlugin
- UMD and CommonJs files
Sources are distributed through:
- bower (
bower install router5-listeners
) - npm (
bower install --save router5-listeners
)
How to use
;; const router = ;
API
This plugin adds the following methods to your router instance:
addListener(fn)
removeListener(fn)
addNodeListener(nodeName, fn)
removeNodeListener(nodeName, fn)
addRouteListener(routeName, fn)
removeRouteListener(routeName, fn)
Contributing
Please read contributing guidelines on router5 repository.