Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Share Vuejs Route with Codeigniter Route

$
0
0
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!

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>