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

this.$router标题有误 #2048

merged 2 commits into from
Feb 27, 2018

Conversation

773500646
Copy link
Contributor

在组件中访问当前路由使用this.$route,页面中标题写的是this.$router

在组件中访问当前路由使用this.$route,页面中标题写的是this.$router
@@ -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 访问当前路由:

@posva posva merged commit 9015fa7 into vuejs:dev Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants