{"action":"created","comment":{"url":"https://api.github.com/repos/vuejs/vue-router/pulls/comments/133304049","pull_request_review_id":56466183,"id":133304049,"diff_hunk":"@@ -64,6 +64,27 @@ const app = new Vue({\n // Now the app has started!\n ```\n \n+By injecting the router, we get access to it as `this.$router` as well as the current route as `this.$route` inside of any component:\n+\n+```js\n+// Home.vue\n+export default {\n+  computed: {\n+    params () {\n+      // We will see what params are shortly\n+      return this.$route.params\n+    }\n+  },\n+  methods: {\n+    someMethod () {\n+      // Redirecting to another route\n+      this.$router.push('/redirect')\n+    }","path":"docs/en/essentials/getting-started.md","position":19,"original_position":19,"commit_id":"53593c73f1dbcb03abf61a4bd8d825ae96264fb6","original_commit_id":"53593c73f1dbcb03abf61a4bd8d825ae96264fb6","user":{"login":"chrisvfritz","id":2327556,"avatar_url":"https://avatars2.githubusercontent.com/u/2327556?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisvfritz","html_url":"https://github.com/chrisvfritz","followers_url":"https://api.github.com/users/chrisvfritz/followers","following_url":"https://api.github.com/users/chrisvfritz/following{/other_user}","gists_url":"https://api.github.com/users/chrisvfritz/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvfritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvfritz/subscriptions","organizations_url":"https://api.github.com/users/chrisvfritz/orgs","repos_url":"https://api.github.com/users/chrisvfritz/repos","events_url":"https://api.github.com/users/chrisvfritz/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvfritz/received_events","type":"User","site_admin":false},"body":"Another note: I'd probably avoid the word \"redirect\" here, as I think it implies an immediate transfer to another route in most cases - \"navigate\" or simple \"go\" are probably more appropriate.","created_at":"2017-08-15T21:07:42Z","updated_at":"2017-08-15T21:10:21Z","html_url":"https://github.com/vuejs/vue-router/pull/1687#discussion_r133304049","pull_request_url":"https://api.github.com/repos/vuejs/vue-router/pulls/1687","_links":{"self":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/comments/133304049"},"html":{"href":"https://github.com/vuejs/vue-router/pull/1687#discussion_r133304049"},"pull_request":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1687"}}},"pull_request":{"url":"https://api.github.com/repos/vuejs/vue-router/pulls/1687","id":135872934,"html_url":"https://github.com/vuejs/vue-router/pull/1687","diff_url":"https://github.com/vuejs/vue-router/pull/1687.diff","patch_url":"https://github.com/vuejs/vue-router/pull/1687.patch","issue_url":"https://api.github.com/repos/vuejs/vue-router/issues/1687","number":1687,"state":"open","locked":false,"title":"docs($router): Note that router === this.$router","user":{"login":"posva","id":664177,"avatar_url":"https://avatars0.githubusercontent.com/u/664177?v=4","gravatar_id":"","url":"https://api.github.com/users/posva","html_url":"https://github.com/posva","followers_url":"https://api.github.com/users/posva/followers","following_url":"https://api.github.com/users/posva/following{/other_user}","gists_url":"https://api.github.com/users/posva/gists{/gist_id}","starred_url":"https://api.github.com/users/posva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posva/subscriptions","organizations_url":"https://api.github.com/users/posva/orgs","repos_url":"https://api.github.com/users/posva/repos","events_url":"https://api.github.com/users/posva/events{/privacy}","received_events_url":"https://api.github.com/users/posva/received_events","type":"User","site_admin":false},"body":"<!--\r\nPlease make sure to read the Pull Request Guidelines:\r\nhttps://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines\r\n-->\r\n","created_at":"2017-08-15T19:27:50Z","updated_at":"2017-08-15T21:10:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d15ae8ded650fc8df8087a8e332a8204bc6e54a6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vue-router/pulls/1687/commits","review_comments_url":"https://api.github.com/repos/vuejs/vue-router/pulls/1687/comments","review_comment_url":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/1687/comments","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/53593c73f1dbcb03abf61a4bd8d825ae96264fb6","head":{"label":"vuejs:docs/router","ref":"docs/router","sha":"53593c73f1dbcb03abf61a4bd8d825ae96264fb6","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":15116946,"name":"vue-router","full_name":"vuejs/vue-router","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vue-router","description":"The official router for Vue.js.","fork":false,"url":"https://api.github.com/repos/vuejs/vue-router","forks_url":"https://api.github.com/repos/vuejs/vue-router/forks","keys_url":"https://api.github.com/repos/vuejs/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vue-router/teams","hooks_url":"https://api.github.com/repos/vuejs/vue-router/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vue-router/events","assignees_url":"https://api.github.com/repos/vuejs/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vue-router/tags","blobs_url":"https://api.github.com/repos/vuejs/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vue-router/languages","stargazers_url":"https://api.github.com/repos/vuejs/vue-router/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vue-router/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vue-router/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vue-router/subscription","commits_url":"https://api.github.com/repos/vuejs/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vue-router/merges","archive_url":"https://api.github.com/repos/vuejs/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vue-router/downloads","issues_url":"https://api.github.com/repos/vuejs/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vue-router/deployments","created_at":"2013-12-11T19:37:46Z","updated_at":"2017-08-15T18:03:00Z","pushed_at":"2017-08-15T19:27:51Z","git_url":"git://github.com/vuejs/vue-router.git","ssh_url":"git@github.com:vuejs/vue-router.git","clone_url":"https://github.com/vuejs/vue-router.git","svn_url":"https://github.com/vuejs/vue-router","homepage":"http://router.vuejs.org/","size":5554,"stargazers_count":6583,"watchers_count":6583,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1746,"mirror_url":null,"open_issues_count":100,"forks":1746,"open_issues":100,"watchers":6583,"default_branch":"dev"}},"base":{"label":"vuejs:dev","ref":"dev","sha":"b06ea217260c20225fc21c59c09f02045792f6bf","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":15116946,"name":"vue-router","full_name":"vuejs/vue-router","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vue-router","description":"The official router for Vue.js.","fork":false,"url":"https://api.github.com/repos/vuejs/vue-router","forks_url":"https://api.github.com/repos/vuejs/vue-router/forks","keys_url":"https://api.github.com/repos/vuejs/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vue-router/teams","hooks_url":"https://api.github.com/repos/vuejs/vue-router/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vue-router/events","assignees_url":"https://api.github.com/repos/vuejs/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vue-router/tags","blobs_url":"https://api.github.com/repos/vuejs/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vue-router/languages","stargazers_url":"https://api.github.com/repos/vuejs/vue-router/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vue-router/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vue-router/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vue-router/subscription","commits_url":"https://api.github.com/repos/vuejs/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vue-router/merges","archive_url":"https://api.github.com/repos/vuejs/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vue-router/downloads","issues_url":"https://api.github.com/repos/vuejs/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vue-router/deployments","created_at":"2013-12-11T19:37:46Z","updated_at":"2017-08-15T18:03:00Z","pushed_at":"2017-08-15T19:27:51Z","git_url":"git://github.com/vuejs/vue-router.git","ssh_url":"git@github.com:vuejs/vue-router.git","clone_url":"https://github.com/vuejs/vue-router.git","svn_url":"https://github.com/vuejs/vue-router","homepage":"http://router.vuejs.org/","size":5554,"stargazers_count":6583,"watchers_count":6583,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1746,"mirror_url":null,"open_issues_count":100,"forks":1746,"open_issues":100,"watchers":6583,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1687"},"html":{"href":"https://github.com/vuejs/vue-router/pull/1687"},"issue":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/1687"},"comments":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/1687/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1687/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1687/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vue-router/statuses/53593c73f1dbcb03abf61a4bd8d825ae96264fb6"}}}}
{"actor":{"display_login":"chrisvfritz"}}