@peter.naydenov/route-emitter
Version:
Changes in URL are converted in events according routes definition list
19 lines (13 loc) • 325 B
JavaScript
function run ( dependencies, state ) {
/**
* @function run
* @description Run the router
* @returns {void}
*/
return function run () {
const { inAPI, history } = dependencies;
state.isActive = true
history.listen ( inAPI._historyActions )
inAPI._locationChange ()
}} // run func.
export default run