0👍
The expected way to deal with Event Handling is to register an event handler with an inline handler or method handler (via the component methods
property). See Event Handling for more details.
However, even in what you’re trying to do in this example, you should notice that the DOM is not available until the mounted
state in the Vue Lifecyle. See Lifecyle Hooks for more details.
Finally, from this code sample, it looks like you’re trying to do either Dynamic Route Matching or Programmatic Navigation? If so, the Vue Router documentation is your friend.
- [Vuejs]-Vue vee-validate issue capturing date-picker selection
- [Vuejs]-Register user with Vue.js and Laravel
Source:stackexchange.com