Last active
April 9, 2017 14:50
-
-
Save antoniojps/e87858bc294e4a6aa81973c31e5eb2ae to your computer and use it in GitHub Desktop.
Componentes do Vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('meu-componente',{ | |
el: '.class', | |
// criamos funcao que retorna objetos para que nao interfiram com os outros componentes | |
data: function(){ | |
return { | |
foo: 'bar' | |
} | |
}, | |
template: '<p>{{foo}}</p>' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment