<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>VueJs Tutorial - coligo</title>
</head>    
<body>
    <div id="vue-instance">
        input box: <input type="text" v-model="greeting"/> <br>
        text area: <input type="textarea" v-model="areadetexto"/> <br>
        input box: <input type="text" v-model="greeting"/> <br>
        {{$data | json}} <br>
        {{datatopage}}
    </div>
    <script src="https://cdn.jsdelivr.net/vue/2.1.6/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#vue-instance',
            data: {
                greeting: 'Saudações!',
                areadetexto: 'Essa é uma textarea',
                datatopage: 'data to page'
            }
        });
    </script>
</body>
</html>

we can dump the data object of this Vue instance to the page using the special $data property between double curly braces which essentially tells Vue to replace whatever is between those curly braces with the property in the corresponding data object

results matching ""

    No results matching ""