Vue.component('MsgCard', { template: `
{{ msg.subject }}
{{ msg.message }}

{{ msg.tag }}

`, props: ['msg'], // props: ['post', 'favorited'], data: function () { return { // isFavorited: '', }; }, /* mounted() { this.isFavorited = this.isFavorite ? true : false; }, computed: { isFavorite() { return this.favorited; }, },*/ methods: { /* favorite(post) { $.ajax({url: "api/ids", method: "POST"}) .then(response => this.isFavorited = true) .catch(response => console.log(response.data)); }, unFavorite(post) { $.ajax({url: "api/ids", method: "POST"}) .then(response => this.isFavorited = false) .catch(response => console.log(response.data)); }*/ }, });