I'm working on a project to connect images on an HTML5 canvas to specific URLs for navigation within a website.
My tools include Vue
, FabricJS
for the canvas, and Vue-router
for routing.
let computerClick = function (evt) {
console.log("Computer clicked");
this.$router.push('/app');
};
After clicking an item on the canvas, the above function is triggered, but I encounter this error:
Uncaught TypeError: Cannot read property 'push' of undefined
I would appreciate guidance on resolving this issue. Thank you!