i have a function in my single file components
function moveCircle(step: number) {
if (activeCircle.value < 2) {
activeCircle.value += step;
activeLine.value += step;
}
}
and i would like to make a signal to use this function in my index.ts (router)
router.beforeEach((to, from, next) => {
if (to.path > from.path) {
console.log('forward');
} else {
console.log('back');
}
next();
})
try to use a bus -> it,s not possible because to inject is use only on components try to call a function -> it's not possible to make this