om/public/home.js

22 lines
469 B
JavaScript
Raw Normal View History

2018-12-05 16:35:54 +01:00
const HomeRouter = {
template: `
<div>
<MsgCard
v-for="(msg, index) in messages"
:key="msg.id"
:msg="msg"
></MsgCard>
</div>`,
data: function () {
return { messages: _messages };
},
2018-12-05 16:35:54 +01:00
methods: {
2018-12-12 15:56:09 +01:00
refresh_messages: function () {
_messages.push ({id: 42, subject: "xxx", message: "warum habt ihr auch so viel", user: "nobody", tags:"foo"});
},
2018-12-05 16:35:54 +01:00
},
2018-12-12 15:56:09 +01:00
/*mounted: function() {
this.refresh_messages();
}*/
2018-12-05 16:35:54 +01:00
};