Event Handling in Vuejs - Vuejs tutorial for beginners - Tutorial 6

preview_player
Показать описание

Event Handling in Vuejs - In this tutorial we will learn how vuejs handles DOM events. As we learned so far we know that vuejs have directives and for event handling vuejs provides v-on directive to handle DOM events using vuejs.

We will start with simple example which will be just incrementing number using button. We will use click DOM event for incrementing our counter on each click event. We can implement this click event on button using v-on directive. After incrementing number using click event we will decrement numer again using click event.

As we have shorthand to v-bind we also have shorthand to v-on which is @. You can also perform other DOM event with vuejs using v-on directive like focus, change, mouseover etc.

So, in this lacture you will learn how vuejs handles DOM events and how to use shorthand of v-on directive.

Follow me:
Рекомендации по теме