Skip to content

this.$router标题有误 #2048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/zh-cn/essentials/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const app = new Vue({
// 现在,应用已经启动了!
```

通过注入路由,我们可以用 `this.$router` 来访问它,就像在任何组件里用 `this.$router` 访问当前路由一样。
通过注入路由,我们可以用 `this.$route` 来访问它,就像在任何组件里用 `this.$route` 访问当前路由一样。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one should be left as this.$router

Copy link
Member

@Jinjiang Jinjiang Feb 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我推荐的译法 (My recommendations):

通过注入路由器,我们可以在任何组件内通过 this.$router 访问路由器,也可以通过 this.$route 访问当前路由:


```js
// Home.vue
Expand Down