File tree Expand file tree Collapse file tree 6 files changed +124
-27
lines changed Expand file tree Collapse file tree 6 files changed +124
-27
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" role =" main" >
3
- <logo :src =" require('@/assets/logo.png')" />
4
- <h1 data-va =" main header" >{{ msg }}</h1 >
5
- <h2 >Essential Links</h2 >
6
- <ul >
7
- <li ><a href =" https://vuejs.org" target =" _blank" >Core Docs</a ></li >
8
- <li ><a href =" https://forum.vuejs.org" target =" _blank" >Forum</a ></li >
9
- <li ><a href =" https://chat.vuejs.org" target =" _blank" >Community Chat</a ></li >
10
- <li ><a href =" https://twitter.com/vuejs" target =" _blank" >Twitter</a ></li >
11
- </ul >
12
- <h2 >Ecosystem</h2 >
13
- <ul >
14
- <li ><a href =" http://router.vuejs.org/" target =" _blank" >vue-router</a ></li >
15
- <li ><a href =" http://vuex.vuejs.org/" target =" _blank" >vuex</a ></li >
16
- <li ><a href =" http://vue-loader.vuejs.org/" target =" _blank" >vue-loader</a ></li >
17
- <li ><a href =" https://github.com/vuejs/awesome-vue" target =" _blank" >awesome-vue</a ></li >
18
- </ul >
3
+ <router-view />
19
4
</div >
20
5
</template >
21
6
22
7
<script >
23
- import Logo from ' @/components/Logo'
24
-
25
8
export default {
26
- name: ' app' ,
27
- components: {
28
- Logo
29
- },
30
- data () {
31
- return {
32
- msg: ' Welcome - Open your console'
33
- }
34
- }
9
+ name: ' app'
35
10
}
36
11
</script >
37
12
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
import App from './App.vue'
3
+ import router from './router.js'
3
4
4
5
// Use this plugin only in development => if (process.env.NODE_ENV !== 'production')
5
6
const VueAxe = require ( '../vue-axe' )
@@ -20,5 +21,6 @@ Vue.config.productionTip = false
20
21
/* eslint-disable no-new */
21
22
new Vue ( {
22
23
el : '#app' ,
24
+ router,
23
25
render : h => h ( App )
24
26
} )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ <h1 >About page</h1 >
4
+ <!-- Force aXe errors -->
5
+ <section role =" ljks" >
6
+ <p role =" button" >
7
+ My content
8
+ <router-link to =" /" >Go to Home</router-link >
9
+ <router-link to =" /contact" >Contact</router-link >
10
+ </p >
11
+ </section >
12
+ </div >
13
+ </template >
14
+
15
+ <script >
16
+ export default {
17
+ name: ' About'
18
+ }
19
+ </script >
20
+
21
+ <style scoped>
22
+
23
+ </style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ <h1 >Contact page</h1 >
4
+ <!-- Force aXe errors -->
5
+ <section role =" ljks" >
6
+ <p role =" button" >
7
+ Contact me
8
+ <router-link to =" /" >Go to Home</router-link >
9
+ </p >
10
+ </section >
11
+ </div >
12
+ </template >
13
+
14
+ <script >
15
+ export default {
16
+ name: ' Contact'
17
+ }
18
+ </script >
19
+
20
+ <style >
21
+
22
+ </style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ <logo :src =" require('@/assets/logo.png')" />
4
+ <h1 data-va =" main header" >{{ msg }}</h1 >
5
+ <h2 >Access Pages</h2 >
6
+ <ul >
7
+ <li >
8
+ <router-link to =" /about" >About</router-link >
9
+ </li >
10
+ <li >
11
+ <router-link to =" /contact" >Contact</router-link >
12
+ </li >
13
+ </ul >
14
+ </div >
15
+ </template >
16
+
17
+ <script >
18
+ import Logo from ' @/components/Logo'
19
+
20
+ export default {
21
+ name: ' Home' ,
22
+ components: {
23
+ Logo
24
+ },
25
+ data () {
26
+ return {
27
+ msg: ' Welcome - Open your console'
28
+ }
29
+ }
30
+ }
31
+ </script >
32
+
33
+ <style scoped>
34
+
35
+ </style >
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+ import VueRouter from 'vue-router'
3
+
4
+ import Home from '@/pages/Home'
5
+ import About from '@/pages/About'
6
+ import Contact from '@/pages/Contact'
7
+
8
+ Vue . use ( VueRouter )
9
+
10
+ const router = new VueRouter ( {
11
+ mode : 'history' ,
12
+ routes : [
13
+ {
14
+ name : 'home' ,
15
+ path : '/' ,
16
+ component : Home ,
17
+ meta : {
18
+ announcer : 'Home page'
19
+ }
20
+ } ,
21
+ {
22
+ name : 'about' ,
23
+ path : '/about' ,
24
+ component : About ,
25
+ meta : {
26
+ announcer : 'About page'
27
+ }
28
+ } ,
29
+ {
30
+ name : 'contact' ,
31
+ path : '/contact' ,
32
+ component : Contact ,
33
+ meta : {
34
+ announcer : 'Contact page'
35
+ }
36
+ }
37
+ ]
38
+ } )
39
+
40
+ export default router
You can’t perform that action at this time.
0 commit comments