Vue Instance
- Describe what happens when a user interacts with the app
- Created in JS
- Contains the logic of the HTML element
new Vue({
/* Identifier of the Vue Template element */,
el: '#app'
/* Definition of methods that can be tied to HTML elements */
methods: {
onInput: function (event) { /* event object */
console.log(event.target.value);
}
}
});
Event object
event
: reference to the event that occurred
target
: reference to the HTML element where the event occurred
value
: value of a HTML element