Mahmud Adam Mahmud Adam -5 years ago 261
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
tag. How can get the same results without using the now deprecated param attributes?

Answer Source

Use modifiers:

<input v-model.number="msg">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download