Skip to content

Instantly share code, notes, and snippets.

@ardeay
Created August 13, 2019 02: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 ardeay/6d3e2a82d2eaae2d69818f536bf6ecac to your computer and use it in GitHub Desktop.
Save ardeay/6d3e2a82d2eaae2d69818f536bf6ecac to your computer and use it in GitHub Desktop.
<html>
<head>
<title>My App</title>
</head>
<body>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
<h1>Hello World</h1>
<div id="zestyApp">
<h2 class="title">{{ message }}</h2>
<h4 class="subtitle">{{ subtitle }}</h4>
<button @click="hello()" class="button">Click Me</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
var app = new Vue({
el: '#zestyApp',
data: {
message: 'Hello Vue!',
subtitle: 'hey all there is more pizza'
},
methods: {
hello: function () {
this.subtitle = 'Pizza is running out omg!'
setTimeout(function(){
this.subtitle = 'not its not, lawls!!!'
}.bind(this), 3000)
}
}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment