I get an error: "Uncaught TypeError: this.thePerson is not a function" when I run this:
var myApp = new Vue({
el: "#app",
data: {
person: [this.thePerson()]
},
methods: {
thePerson: function() {
return {
personNickname: "Bob",
personOwes: 0,
paymentType: {
card: true,
cash: false
}
};
}
}
});
I can't figure out why!
P.S. I realize this is weird looking code but there's a reason why I'm using a function to return the array contents...