Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue directive parameter

<div v-test="'hello world'"></div>

Vue.directive('test', {
  bind(el, binding) {
  	const val = binding.value
  	console.log(val) // hello world
  }
})
 
PREVIOUS NEXT
Tagged: #vue #directive #parameter
ADD COMMENT
Topic
Name
5+7 =