{"action":"closed","issue":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/933","repository_url":"https://api.github.com/repos/vuejs/vue-router","labels_url":"https://api.github.com/repos/vuejs/vue-router/issues/933/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/933/comments","events_url":"https://api.github.com/repos/vuejs/vue-router/issues/933/events","html_url":"https://github.com/vuejs/vue-router/issues/933","id":191475722,"number":933,"title":"In the hash mode, press the browser back button is not work","user":{"login":"ml-milkmidi","id":19482565,"avatar_url":"https://avatars.githubusercontent.com/u/19482565?v=3","gravatar_id":"","url":"https://api.github.com/users/ml-milkmidi","html_url":"https://github.com/ml-milkmidi","followers_url":"https://api.github.com/users/ml-milkmidi/followers","following_url":"https://api.github.com/users/ml-milkmidi/following{/other_user}","gists_url":"https://api.github.com/users/ml-milkmidi/gists{/gist_id}","starred_url":"https://api.github.com/users/ml-milkmidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ml-milkmidi/subscriptions","organizations_url":"https://api.github.com/users/ml-milkmidi/orgs","repos_url":"https://api.github.com/users/ml-milkmidi/repos","events_url":"https://api.github.com/users/ml-milkmidi/events{/privacy}","received_events_url":"https://api.github.com/users/ml-milkmidi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-24T09:51:39Z","updated_at":"2016-11-24T10:20:44Z","closed_at":"2016-11-24T10:20:44Z","body":"sample code\r\nhttps://router.vuejs.org/en/advanced/meta.html\r\n\r\nconst router = new VueRouter( {\r\nmode: 'hash' // back button not work\r\n//mode: 'history' // it's work\r\n})\r\n\r\nrouter.beforeEach((to, from, next) => {\r\nconsole.log(to); // not toggle log ????????????\r\n  if (to.matched.some(record => record.meta.requiresAuth)) {\r\n    if (!auth.loggedIn()) {\r\n      next({\r\n        path: '/login',\r\n        query: { redirect: to.fullPath }\r\n      })\r\n    } else {\r\n      next()\r\n    }\r\n  } else {\r\n    next() // make sure to always call next()!\r\n  }\r\n})\r\n\r\nThanks"}}
{"actor":{"display_login":"fnlctrl"}}