Remove un-used Vue files + Create Fruits directory & Fruit details pages
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
import Vue from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
import Home from '../views/Home.vue';
|
||||
import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
import Fruits from "../views/Fruits.vue";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
path: "/",
|
||||
name: "Fruits",
|
||||
component: Fruits
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
path: "/fruit",
|
||||
name: "Fruit",
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
|
||||
},
|
||||
component: () => import(/* webpackChunkName: "about" */ "../views/Fruit.vue")
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
mode: "history",
|
||||
base: process.env.BASE_URL,
|
||||
routes,
|
||||
routes
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user