Event Modifiers

Learn about event modifiers in Vue.js.

Front-end frameworks like Vue.js provide the functionality of handling events in their own way. But they often clash or overlap with the browser’s default behavior. For example, when clicking on a link defined using the <a> tag, the browser will load the link in the current window automatically. When you define your own event listener on the <a> element, the bound function is executed followed by the browser’s default action. This is a nuisance usually and needs to be stopped. This behavior is demonstrated in the application shown below.

Get hands-on with 1200+ tech skills courses.