Vue.js Custom Directives

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • Vue.directive(id, definition);
  • Vue.directive(id, update); //when you need only the update function.

Parameters

ParameterDetails
idString - The directive id that will be used without the v- prefix. (Add the v- prefix when using it)
definitionObject - A definition object can provide several hook functions (all optional): bind, update, and unbind


Got any Vue.js Question?