Skip to content

Instantly share code, notes, and snippets.

@paveltimofeev
Created November 28, 2017 15:36
Show Gist options
  • Save paveltimofeev/89d7bcc9ed0da51b8f9559a1971009d2 to your computer and use it in GitHub Desktop.
Save paveltimofeev/89d7bcc9ed0da51b8f9559a1971009d2 to your computer and use it in GitHub Desktop.

Revisions

  1. paveltimofeev created this gist Nov 28, 2017.
    29 changes: 29 additions & 0 deletions VueJS.scaffold.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    <html>
    <head>
    <script src="https://unpkg.com/vue"></script>
    </head>
    <body>

    <div id="app" v-on:click="sayHello('John', $event)">
    {{ message }}
    </div>

    <br><small><i><a href="https://vuejs.org/v2/guide/">https://vuejs.org/v2/guide/</a></i></small>

    </body>

    <script>
    var app = new Vue({
    el: '#app',
    data: {
    message: 'Click on me!'
    },
    methods: {
    sayHello: function( name ){
    app.message = 'Hello, ' + name + ' ^.^ !';
    }
    }
    })
    </script>

    </html>