Skip to content

Instantly share code, notes, and snippets.

@revdfdev
Created February 9, 2019 10:51
Show Gist options
  • Select an option

  • Save revdfdev/b50f94fb4a5742952762a623e0029fb5 to your computer and use it in GitHub Desktop.

Select an option

Save revdfdev/b50f94fb4a5742952762a623e0029fb5 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/ribajam
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js"></script>
<div id="app">
<button @click="changeLink">Click to change link</button>
<a :href="link">Link</a>
</div>
<script id="jsbin-javascript">
new Vue({
el: "#app",
data: {
link: "http://google.com"
},
methods: {
changeLink: function() {
this.link = "http://duckduckgo.com"
}
}
})
</script>
<script id="jsbin-source-javascript" type="text/javascript">new Vue({
el: "#app",
data: {
link: "http://google.com"
},
methods: {
changeLink: function() {
this.link = "http://duckduckgo.com"
}
}
})</script></body>
</html>
new Vue({
el: "#app",
data: {
link: "http://google.com"
},
methods: {
changeLink: function() {
this.link = "http://duckduckgo.com"
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment