vuebase

by Michel Piallier

HTML

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

<!-- View  -->
<div id='app'>
    <h1>Vue Js</h1>
    <h2>{{text}}</h2>
 <p>{{presentation(5,10,15)}}</p>
 <h2>{{presentation2()}}</h2>
</div>

JavaScript

new Vue ({
    el: '#app',
    data: {
      text: 'Hello World',
      nb:50
    },
    methods: {
    	presentation: function(a,b,c){
        	return a + b + c;
        },
        presentation2: function(){
        	return this.text + " " +this.nb;
        }
    }
})