I am encountering an issue while trying to pass 'joke.id' as a parameter to the router:
edit: function(joke) {
this.$router.push({ '/edit/' + joke.id });
}
The specific route in question is:
{path: '/edit/:id', component: editJoke, name: 'editJoke'},
Despite setting up the route correctly, I am receiving an error message in the console:
Module build failed: SyntaxError: Unexpected token
this.$router.push({ '/edit/' + joke.id });
| ^
Can anyone offer guidance on how to resolve this issue?