Welcome Guest, Not a member yet? Register   Sign In
Share Vuejs Route with Codeigniter Route
#1

i'm building a customer admin with Vuejs, within my CodeIgniter application.

I use the VueRouting for different sections within the dashboard

Code:
export default new Router({
    routes: [
    {
        path: '/',
        name: 'dashboard',
        component: Dashboardpage
    },
    {
        path: '/account',
        name: 'account',
        component: Accountpage
    }

    ]
})

Everything works except that it's adding the Hash on top of the route.

So http://platform.com/admin/#/account 
If i would navigate to account

The thing is, if I add
hashbang:false,
history:true,

Then the link is http://platform.com/admin/account 

But it switches to de default CodeIgniter Routing

Could I exclude routes from CodeIgniter, or do something with .htaccess ?

In Laravel it's something like this
PHP Code:
Route::get('/vue/{vue_capture?}', function () {
 return 
view('vue.index');
})->
where('vue_capture''[\/\w\.-]*'); 

But I'm a CodeIgniter fan!
Reply


Messages In This Thread
Share Vuejs Route with Codeigniter Route - by ponzo - 10-20-2017, 12:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB