mardi 23 janvier 2018

after removing hash mode from vue-route page not loading

hello guys i m new to vue, i does lots of google but haven't find any solution related to this type of problem here is my route web.php

Route::get('login', function () {
      return view('auth.login');
});

here is my login blade

@extends('layouts.auth')
@section('content')
<router-view name="Login" ></router-view>
@endsection

here is my vue route

require('./bootstrap'); 
window.Vue = require('vue');
import VueRouter from 'vue-router';
window.Vue.use(VueRouter); 
import login from './website/auth/login.vue';

const routes = [
 { 
     path:  '/',
     components: {
        Login: login,
     },
 },]

const router = new VueRouter({routes })
const app = new Vue({ router }).$mount('#app')

this above code code work properly but one problem is that it has # in url. so i use mode history to remove below code

const router = new VueRouter({mode:'history',routes })

it not working here i m attach image of page can i know what i m missing https://i.stack.imgur.com/TPli0.png



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire