Shell/Bash: install vue router Example


Shell/Bash Example: This is the "install vue router" Example. compiled from many sources on the internet by

install vue router

npm install vue-router

installing vue router & implementation

//Installing Vue Router
npm install vue-router

//main.js - Add below lines
import VueRouter from 'vue-router';


const router = new VueRouter({
  mode: 'history'

new Vue({
  render: h => h(App)

//App.vue - Add below line in v-content


//route.js - We need to craate file under src
import linkName from './components/fileName.vue';
export const routes = [
    path: '/',
    component: linkName

install vue router

cd [project]
npm install --save vue-router // install only on the project that we are in

setup vue router

import Vue from 'vue'
import VueRouter from 'vue-router'


vue-router dev

npm install vue-router -dev

* Summary: This "install vue router" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!