I'm trying to send 'joke.id' as parameter to the router:
edit: function(joke) {
this.$router.push({ '/edit/' + joke.id });
}
The relevant route is:
{path: '/edit/:id', component: editJoke, name: 'editJoke'},
However I get this in the console:
Module build failed: SyntaxError: Unexpected token
this.$router.push({ '/edit/' + joke.id });
| ^
How can I fix this?