DucaturFw / ducor-frontend

Ducatur Oracles Frontend
1 stars 2 forks source link

laravel with vue js router not working ? #6

Closed dhaval1123 closed 6 years ago

dhaval1123 commented 6 years ago

I have make a project in laravel with vue js my issue first i have set in route mode history beacause i want to remove # tag then after i have change route using vue js so remove url below see image:

first load home component see in image above url:

home

when i click a about link remove before component name project name from url :

about

same as in contact component :

contact

` import Vue from 'vue'; import Vuerouter from 'vue-router' require('./bootstrap');

window.Vue = require('vue'); Vue.use(Vuerouter);

import App from './../../views/App.vue'

import routes from './router/routes';

const router = new Vuerouter({ mode: 'history', routes:routes

});

new Vue({ el: '#app', router, components: { App }, });

`

routes.js

`import home from './../components/home.vue'; import about from './../components/about.vue'; import contact from './../components/contact.vue';

const routes = [ { path : '/',name : 'home',component : home }, { path : '/about',name : 'about',component : about }, { path : '/contact', name : 'contact', component : contact } ]

export default routes`

zlumer commented 6 years ago

You have better chances to get help in Vue.js repo or on Stack Overflow. This repository is dedicated to development of Ducatur Oracles.