summaryrefslogtreecommitdiffstats
path: root/settings/src/router.js
blob: e23a07e3ffc8f06394107f5503a6fc7d77f06cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Vue from 'vue';
import Router from 'vue-router';
import Users from './views/Users';

Vue.use(Router);

/*
 * This is the list of routes where the vuejs app will
 * take over php to provide data
 * You need to forward the php routing (routes.php) to
 * /settings/main.php, where the vue-router will ensure
 * the proper route.
 * ⚠️ Routes needs to match the php routes.
 */

export default new Router({
	mode: 'history',
	base: window.location.pathname,
	parseQuery: function(query) {console.log(query);},
	routes: [{
		path: '/settings/users',
		component: Users,
		props: true,
		children: [{
			  path: ':selectedGroup',
			  component: Users
			},
		]
	}]
});