Mahmud Adam Mahmud Adam - 4 months ago 24
Javascript Question

Directive Param Attributes in Vue 2.0

I understand that directive param attributes have been deprecated in Vue.js 2.0. So I can no longer do something such as

v-model="msg" number
inside of an
input
tag. How can get the same results without using the now deprecated param attributes?

Answer

Use modifiers:

<input v-model.number="msg">