@removeRoot = new RegExp('^' + utils.escapeRegExp(@options.root) + '(#)?')
@subscribeEvent '!router:route', @oldEventError
@subscribeEvent '!router:routeByName', @oldEventError
@subscribeEvent '!router:changeURL', @oldURLEventError
@subscribeEvent 'dispatcher:dispatch', @changeURL
mediator.setHandler 'router:route', @route, this
mediator.setHandler 'router:reverse', @reverse, this
@createHistory()
oldEventError: ->
throw new Error '!router:route and !router:routeByName events were removed.
Use `Chaplin.utils.redirectTo`'
oldURLEventError: ->
throw new Error '!router:changeURL event was removed.'