<div id="watch-example">
<p>
Start writing:
<input v-model="text">
</p>
<p>{{ result }}</p>
</div>
var watchExampleVM = new Vue({
el: '#watch-example',
data: {
text: '',
result: 'Waiting for changes...',
},
watch: {
text: function (newValue, oldValue) {
this.result = newValue
}
},
})
This Pen doesn't use any external CSS resources.