1

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

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.