vue router implementation
//Implementation
//main.js - Add below lines
import VueRouter from 'vue-router';
Vue.use(VueRouter);
const router = new VueRouter({
routes,
mode: 'history'
});
new Vue({
router,
render: h => h(App)
}).$mount('#app')
//App.vue - Add below line in v-content
/*
<template>
<v-app>
<v-content>
<router-view></router-view>
</v-content>
</v-app>
</template>
*/
//route.js - We need to craate file under src
import linkName from './components/fileName.vue';
export const routes = [
{
path: '/',
component: linkName
}
]
Also in JavaScript:
- Javascript - Track mouse position
- for loop javascript
- flutter vs react native
- javascript atualize array
- resizing div js
- how to get seconds in timstamps js
- how to replace characters in a string javascript
- insert condition in a object javascript
- search string in file node
- find a string in an array javascript
- d3 violin plot with points
- dynamodb get all items nodejs
- jquery open a new tab
- javascript console.log
- javascript create script tag
- js string insert space
- change input to required jquery
- How to test useEffect in react testing library
- set readonly in javascript
- change value of drop down using jquery
- jquery get element id
- --constraint node.labels. in compose file
- js get query param
- jquery script tag