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 11<template >
22 <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 />
194 </div >
205</template >
216
227<script >
23- import Logo from ' @/components/Logo'
24-
258export default {
26- name: ' app' ,
27- components: {
28- Logo
29- },
30- data () {
31- return {
32- msg: ' Welcome - Open your console'
33- }
34- }
9+ name: ' app'
3510}
3611 </script >
3712
Original file line number Diff line number Diff line change 11import Vue from 'vue'
22import App from './App.vue'
3+ import router from './router.js'
34
45// Use this plugin only in development => if (process.env.NODE_ENV !== 'production')
56const VueAxe = require ( '../vue-axe' )
@@ -20,5 +21,6 @@ Vue.config.productionTip = false
2021/* eslint-disable no-new */
2122new Vue ( {
2223 el : '#app' ,
24+ router,
2325 render : h => h ( App )
2426} )
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