Skip to content

@vowel.to/client v0.3.3-beta


@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

ParameterType
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;
}
NameTypeDefined in
navigationAdapterNavigationAdapterlib/vowel/adapters/helpers.ts:301
automationAdapter?AutomationAdapterlib/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' }]
});