Create a gist now

Instantly share code, notes, and snippets.

@justinyoo /hello.vue.js Secret
Created Feb 13, 2017

What would you like to do?
Running Vue.js on ASP.NET Core Web Application
<script>
export default {
name: 'hello',
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
},
// Send a request to /api/hello
created () {
this.$http
.get('/api/hello')
.then((res) => {
this.msg = res.body.message
})
.catch((ex) => console.log(ex))
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment