Why my code doesn't display the result coming from my API in ExpressJs?
It successfully prints the details in my console but doesn't display on my page.
What could be the reason why this is not working?
<template>
<div>
<h1>{{result.First_Name}}</h1>
<h1>{{result.First_Name}}</h1>
</div>
</template>
<script>
export default {
data() {
return {
Memb_ID: this.$route.params.Memb_ID,
result: {}
};
},
created() {
this.$http
.get("http://localhost:9000/api/user/" + this.Memb_ID)
.then(function(data) {
console.log(data);
this.result = data.body;
});
}
};
</script>
EDIT: I added the screenshot of my console.