installing vue router & implementation
//Installing Vue Router
npm install vue-router
//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 random no between 2 numbers
- props in react app
- rsa encryption js
- js array to object with keys
- angular pipe for 2 decimal places
- angular Property 'value' does not exist on type 'HTMLElement'.
- how to fill array with consecutive numbers javascript
- detecting change in animated value react native
- javascript set select option
- jquery array compare values
- axios.interceptors.response.use
- javascript change voice language
- javascript queryselector
- javascript string literal
- javscript rename property name
- fetch api in js
- the path argument must be of type string. received undefined react
- bcrypt_lib.node not found
- what is node in selenium grid
- local storage in vanila javascript
- new line with javascript write
- how to search for a voice channel within a guild using discord.js
- package.json beginner
- how to use hooks react