history.push(routePath, state?, options?)
history.push(routePath, state?, options?)
history.back()
go backhistory.forward()
go forwardhistory.go(n)
go back or forward n or -n timeshistory.pop(pos)
removes route from positionhistory.get(pos)
get route from positionhistory.insert(pos, routePath, state?, options?)
insert route into positionhistory.insertAndGo(pos, routePath, state?, options?)
insert route and navigate tohistory.insertReplace(pos, routePath, state?, options?)
insert route replacementhistory.insertReplaceAndGo(pos, routePath, state?, options?)
insert route replacement and navigate tohistory.position
actual history positionhistory.list
history routes listhistory.last
history routes list last elementhistory.length
history routes list lengthhistory.actual
actual routehistory.url
actual route urlhistory.state
actual route state (any data)history.url
actual route url (and actual page url)history.pathname
route url pathnamehistory.search
actual route url searchhistory.hash
actual route url hashhistory.listen(callback)
listen allhistory.addEventListener(name, callback)
listenhistory.removeEventListener(name, callback)
remove listener
event.action
POP | PUSH | REPLACE (for compatibility with npm 'history' package)event.type
navigate | push | forward | backward | insert | pop | replaceevent.movement
route position difference (only on push or navigate events)event.position
actual position or affected position (like pop event)event.lastPosition
previos position (only on push or navigate events)event.last
previous routeevent.route
actual route (push or navigate events)event.isNewRoute
true when pushed new routeevent.cancel()
event.setState(state)
works only on push eventevent.setOptions(options)
works only on push event
listen
triggers on all events
replace
pop
push
insert
exit
route.state
route state (any data)route.url
route urlroute.pathname
route url pathnameroute.search
route url searchroute.query
route url search paramsroute.hash
route url hashroute.position
position on historyroute.next
next routeroute.prev
previous route
title
changes document.title if history optionuseTitle
toggled onpopOnBack
destroys route on back from there (launches event)popOnForward
destroys route on forward from there (launches event)
bool: options.useHashRouter = false
routes will be like#!/route_path
bool: options.ignoreHashChange = true
history won't keep any track of hash changesbool: options.useTitle = false
change document.title depending on routes