@@ -24,27 +24,29 @@ const router = new VueRouter({
24
24
base : __dirname ,
25
25
routes : [
26
26
{ path : '/' , redirect : '/parent' } ,
27
- { path : '/parent' , component : Parent , children : [
28
- // an empty path will be treated as the default, e.g.
29
- // components rendered at /parent: Root -> Parent -> Default
30
- { path : '' , component : Default } ,
31
-
32
- // components rendered at /parent/foo: Root -> Parent -> Foo
33
- { path : 'foo' , component : Foo } ,
34
-
35
- // components rendered at /parent/bar: Root -> Parent -> Bar
36
- { path : 'bar' , component : Bar } ,
37
-
38
- // NOTE absolute path here!
39
- // this allows you to leverage the component nesting without being
40
- // limited to the nested URL.
41
- // components rendered at /baz: Root -> Parent -> Baz
42
- { path : '/baz' , component : Baz }
43
- ] }
27
+ { path : '/parent' , component : Parent ,
28
+ children : [
29
+ // an empty path will be treated as the default, e.g.
30
+ // components rendered at /parent: Root -> Parent -> Default
31
+ { path : '' , component : Default } ,
32
+
33
+ // components rendered at /parent/foo: Root -> Parent -> Foo
34
+ { path : 'foo' , component : Foo } ,
35
+
36
+ // components rendered at /parent/bar: Root -> Parent -> Bar
37
+ { path : 'bar' , component : Bar } ,
38
+
39
+ // NOTE absolute path here!
40
+ // this allows you to leverage the component nesting without being
41
+ // limited to the nested URL.
42
+ // components rendered at /baz: Root -> Parent -> Baz
43
+ { path : '/baz' , component : Baz }
44
+ ]
45
+ }
44
46
]
45
47
} )
46
48
47
- const app = new Vue ( {
49
+ new Vue ( {
48
50
router,
49
51
template : `
50
52
<div id="app">
0 commit comments