How to make the to scripts the page stopped working when switching to another route?

I have a setTimeout, which gives the console log, the name of the issuing route, and if I move between two pages, the console logs are constantly being added and old ones remain. Is there any way to do so is to leave all scripts. Ie setTimeout not only that, you can just stop, but imports. Ie that it was in a normal page(when you come, and there is only what is connected on the page itself)

Or maybe you can make scripts loaded only during the initialization?
April 19th 20 at 12:19
0 answer

Find more questions by tags Vue.js