@@ -24,27 +24,29 @@ const router = new VueRouter({
2424 base : __dirname ,
2525 routes : [
2626 { 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+ }
4446 ]
4547} )
4648
47- const app = new Vue ( {
49+ new Vue ( {
4850 router,
4951 template : `
5052 <div id="app">
0 commit comments