Skip to content

Commit a75adc9

Browse files
committed
update routing example
1 parent 74eaae4 commit a75adc9

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/App.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export default {
1818
</script>
1919

2020
<template>
21-
<button @click="callLocalHost">Call Local Host</button>
21+
<router-link to="/">Home</router-link> |
22+
<router-link to="/lab">Lab</router-link> |
23+
<router-link to="/space-game">Space Game</router-link>
24+
<router-view />
25+
2226
</template>
2327

2428
<style>

src/views/Lab.vue

-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<script>
2-
import CardSlider from '../components/CardSlider.vue'
3-
4-
export default {
5-
components: {
6-
CardSlider
7-
}
8-
}
92
</script>
103

114
<template>
125
<h1>Labs</h1>
13-
<CardSlider />
146
</template>
157

168
<style></style>

0 commit comments

Comments
 (0)