Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. view: (vnode) => {
  2. console.log(vnode.attrs.postId);
  3. console.log(PostsService.comments.get(vnode.attrs.postId));
  4. return PostsService.comments.get(vnode.attrs.postId).map((comment, index) => {
  5. console.log(vnode.attrs.postId);
  6. console.log("comment");
  7. return m("div", {"class": "single-comment", "id": "comment-5"},
  8. [
  9. m("a", {"href": `/${comment.user.username}`},
  10. [
  11. m("img", {"class": "comment_avatar", "src": `${comment.user.avatar}`}),
  12. comment.user.username
  13. ]
  14. ),
  15. m("br"),
  16. markdown.markdown.toHTML(comment.comment),
  17. /* m("a", {"class":"fa fa-trash-alt delete_comment","data-comment-id":"5","data-post-id":"34"})*/
  18. ]
  19. )
  20. })
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement