code: function guardRoute (to, from, next) {
    if (window.confirm(`Navigate to ${to.path}?`)) {
      next()
    } else if (window.confirm(`Redirect to /baz?`)) {
      next('/baz')
    } else {
      next(false)
    }
  }
docs: Signature of all route guards:
  @param {Route} to
  @param {Route} from
  @param {Function} next
  
  See http://router.vuejs.org/en/advanced/navigation-guards.html
  for more details.