Skip to content

Instantly share code, notes, and snippets.

@legomushroom
Last active January 18, 2020 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save legomushroom/a1bc3a9134822e1c8dfedccd0493bd90 to your computer and use it in GitHub Desktop.
Save legomushroom/a1bc3a9134822e1c8dfedccd0493bd90 to your computer and use it in GitHub Desktop.
Vue.js
<div id="app">
<h1>{{ header }}</h1>
<p>Feel free to edit the HTML, JavaScript and CSS in this playground. The preview will update in real-time, so that
you can visually explore your ideas.</p>
<button @click="sayHi">Say Hi! <span class="fa fa-heart" /></button>
</div>
{
"scripts": [
"vue"
],
"styles": []
}
new Vue({
el: "#app",
data: {
header: "Hi, I'm GistPad! 👋"
},
methods: {
sayHi() {
alert("Hi!");
}
}
});
body {
background-color: rgb(69, 170, 204);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment