Skip to content

Instantly share code, notes, and snippets.

@zishe
Created July 27, 2012 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zishe/3189377 to your computer and use it in GitHub Desktop.
Save zishe/3189377 to your computer and use it in GitHub Desktop.
_comment_view.jade
h3 Comments
div.comment-block(ng-repeat='comment in post.comments')
section.comment-body(id='comment-{{comment._id}}').span7
div.comment-user.cline
i.icon-user
span {{comment.name}}
div.comment-content.cline
i.icon-comment
span(ng-hide="comment.edit", ng-model='comment.text') {{comment.text}}
div(ng-show="comment.edit")
.well.form-inline
textarea(ng-model='comment.text', name='text')
button.btn-primary.btn(type='submit', ng-click='changeComment(comment)') Save
div.pull-right
a(href='#', ng-click='deleteComment(comment)')
i.icon-remove
div.pull-right
a(href='#', ng-click='editComment(comment);$log.log(comment)')
i.icon-pencil.remove-comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment