Skip to content

Commit fe5210c

Browse files
committed
translate nested.md
1 parent 82ce70f commit fe5210c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/ja/nested.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Nested Routes
22

3-
Mapping nested routes to nested components is a common need, and it is also very simple with vue-router.
3+
ネストされた routes をネストされたコンポーネントにマッピングすることは共通の要求であり、そしてそれは vue-router では非常に簡単です。
44

5-
Suppose we have the following app:
5+
以下の app があると仮定します:
66

77
``` html
88
<div id="app">
99
<router-view></router-view>
1010
</div>
1111
```
1212

13-
The `<router-view>` here is a top-level outlet. It renders the component matched by a top level route:
13+
`<router-view>` はここではトップレベルの outlet です。トップレベルの route でマッチしたコンポーネントでレンダリングします:
1414

1515
``` js
1616
router.map({
1717
'/foo': {
18-
// Foo is rendered when /foo is matched
18+
// Foo /foo がマッチしたとき、レンダリングされます
1919
component: Foo
2020
}
2121
})
2222
```
2323

24-
Similarly, a rendered component can also contain its own, nested `<router-view>`. For example, if we add one inside the `Foo` component's template:
24+
同様に、レンダリングされたコンポーネントは、独自のネストされた `<router-view>` を含むことができます。例えば、もし `Foo` コンポーネントのテンプレート内部に1つ追加する場合:
2525

2626
``` js
2727
var Foo = Vue.extend({
@@ -33,47 +33,47 @@ var Foo = Vue.extend({
3333
})
3434
```
3535

36-
To render components into this nested outlet, we need to update our route config:
36+
このネストされた outlet でコンポーネントをレンダリングするため、我々の route 設定を更新する必要あります:
3737

3838
``` js
3939
router.map({
4040
'/foo': {
4141
component: Foo,
42-
// add a subRoutes map under /foo
42+
// /foo のもとに subRoutes マップを追加
4343
subRoutes: {
4444
'/bar': {
45-
// Bar will be rendered inside Foo's <router-view>
46-
// when /foo/bar is matched
45+
// /foo/bar がマッチしたとき、
46+
// Bar は Foo の <router-view> 内部でレンダリングされます
4747
component: Bar
4848
},
4949
'/baz': {
50-
// Same for Baz, but only when /foo/baz is matched
50+
// Baz に対しても同じですが、/foo/baz がマッチしたときです
5151
component: Baz
5252
}
5353
}
5454
}
5555
})
5656
```
5757

58-
Now, with the above configuration, when you visit `/foo`, nothing will be rendered inside `Foo`'s outlet, because no sub route is matched. Maybe you do want to render something there. In such case you can provide a `/` subroute in this case:
58+
今、上記設定で、`/foo` にアクセスするとき、サブ route がマッチされないため、`Foo`outlet 内部では何もレンダリングされません。恐らく、そこに何かレンダリングしたいです。このようなケースは、このケースの `/` サブ route 提供することができます。
5959

6060
``` js
6161
router.map({
6262
'/foo': {
6363
component: Foo,
6464
subRoutes: {
6565
'/': {
66-
// This component will be rendered into Foo's <router-view>
67-
// when /foo is matched. Using an inline component definition
68-
// here for convenience.
66+
// このコンポーネントは /foo がマッチされるとき、
67+
// Foo の <router-view> でレンダリングされます。
68+
// 便宜上、ここでインラインコンポーネント定義を使用します。
6969
component: {
7070
template: '<p>Default sub view for Foo</p>'
7171
}
7272
},
73-
// other sub routes...
73+
// 他のサブ routes ...
7474
}
7575
}
7676
})
7777
```
7878

79-
A working demo of this example can be found [here](http://jsfiddle.net/yyx990803/naeg67da/).
79+
この例の動作デモは[ここ](http://jsfiddle.net/yyx990803/naeg67da/)で見つけることができます。

0 commit comments

Comments
 (0)