[Vuejs]-When to use ":" on property passed to component in Vue?

2๐Ÿ‘

: in the template is shorthand for v-bind mean for data binding which mean in your case :option is to tell that the string on the right side is javascript variable. while the latter is just a normal javascript object there no need to binding.
here some link of reference: https://v1.vuejs.org/guide/syntax.html

Leave a comment