Vue, nice to know!
https://v1.vuejs.org/guide/syntax.html
https://v1.vuejs.org/guide/computed.html
https://v1.vuejs.org/guide/class-and-style.html
https://v1.vuejs.org/guide/conditional.html
https://v1.vuejs.org/guide/list.html
https://v1.vuejs.org/guide/events.html
https://v1.vuejs.org/guide/forms.html
Ex: v-bind:value="email" -> shorthand -> :value="email"
v-model:value="email" -> lets the browser update the value
v-on:click.prevent="process" -> a click event. Will have to define a method called process. .prevent stops the function to refresh the site if its a button.
Shorthand for v-on:click is @click
To access Vue component from console, define it as a variable:
var vm = new Vue({
el: '#app',
data: {
message: 'Login details',
username: '',
email: thomaskarlandersson@outlook.com,
},
methods: {
process: function() {
console.log('the button was clicked' + this.email);
}
},
});