Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- view: (vnode) => {
- console.log(vnode.attrs.postId);
- console.log(PostsService.comments.get(vnode.attrs.postId));
- return PostsService.comments.get(vnode.attrs.postId).map((comment, index) => {
- console.log(vnode.attrs.postId);
- console.log("comment");
- return m("div", {"class": "single-comment", "id": "comment-5"},
- [
- m("a", {"href": `/${comment.user.username}`},
- [
- m("img", {"class": "comment_avatar", "src": `${comment.user.avatar}`}),
- comment.user.username
- ]
- ),
- m("br"),
- markdown.markdown.toHTML(comment.comment),
- /* m("a", {"class":"fa fa-trash-alt delete_comment","data-comment-id":"5","data-post-id":"34"})*/
- ]
- )
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement