@vowel.to/client / index / createVueRouterAdapters
Function: createVueRouterAdapters()
ts
function createVueRouterAdapters(router, options?): {
navigationAdapter: NavigationAdapter;
automationAdapter?: AutomationAdapter;
};Defined in: lib/vowel/adapters/helpers.ts:297
Quick setup for Vue Router
Parameters
| Parameter | Type |
|---|---|
router | { push: (path) => void; currentRoute: { value: { path: string; }; }; } |
router.push | (path) => void |
router.currentRoute? | { value: { path: string; }; } |
router.currentRoute.value? | { path: string; } |
router.currentRoute.value.path? | string |
options? | { routes?: VowelRoute[]; enableAutomation?: boolean; } |
options.routes? | VowelRoute[] |
options.enableAutomation? | boolean |
Returns
ts
{
navigationAdapter: NavigationAdapter;
automationAdapter?: AutomationAdapter;
}| Name | Type | Defined in |
|---|---|---|
navigationAdapter | NavigationAdapter | lib/vowel/adapters/helpers.ts:301 |
automationAdapter? | AutomationAdapter | lib/vowel/adapters/helpers.ts:302 |
Example
ts
import { createVueRouterAdapters } from '@vowel.to/client/adapters/helpers';
import { useRouter } from 'vue-router';
const router = useRouter();
const adapters = createVueRouterAdapters(router, {
routes: [{ path: '/', description: 'Home' }]
});