我陪你] Re Vue 重頭說起 | vue router enter
[想入門,我陪你]ReVue重頭說起|Day19:路由器進階功能應用-HackMD#[想入門,我陪你]ReVue重頭說起|Day19:路由器進階功能應用######tags:`Vue`、`Re:Vue重頭說起`、`Alex宅幹嘛`##[PassingPropstoRouteComponents](https://router.vuejs.org/guide/essentials/passing-props.html#boolean-mode)(13:00)```htmlmixed=
# [ 想入門,我陪你 ] Re Vue 重頭說起|Day 19:路由器進階功能應用 ###### tags: `Vue`、`Re:Vue 重頭說起`、`Alex 宅幹嘛` ## [Passing Props to Route Components](https://router.vuejs.org/guide/essentials/passing-props.html#boolean-mode) (13:00) ```htmlmixed= <body> <div id="app"> <p> <router-link></router-link> </p> </div> </body> <script> const Index = { template: ` <div>Index</div> <p>{{ $router.params.id }}</p> <p>{{ $router.query.test }}</p> ` } const router = new VueRouter({ routes: [ { path: /:id, componens: { default: Index, }, name: index } ...