Andrey Naldoni |
|
Social/AndreyNaldoni/in/AndreyNaldoni @AndreyNaldoni andreynaldoni.com AndreyNaldoni@gmail.com Github/andreynaldoni |
<div id="app">
{{ msg }}
</div>
new Vue({
el: '#app',
data: { msg: 'Hello World!'}
});
<div id="example">
<p v-if="greeting">Hello World!</p>
</div>
new Vue({
el: '#example',
data: {
greeting: true
}
})
<div id="example">
<app-nav></app-nav>
<app-view>
<app-sidebar></app-sidebar>
<app-content></app-content>
</app-view>
</div>
<div id="example">
<my-component></my-component>
</div>
// Defining
var MyComponent = Vue.extend({
template: '<div>A custom component!</div>'
})
// Registering
Vue.component('my-component', MyComponent)
// Vue root instance
new Vue({
el: '#example'
})
*vue-loader required, made with vue-cli generator.
Vue.js Official - https://vuejs.org/
Vue.js Brasil Community - http://www.vuejs-brasil.com.br/
Vue.js Brasil Telegram - https://telegram.me/vuejsbrasil
Vue.js SP Meetup - https://www.meetup.com/VueJS-SP/