@Input() focusOnInit = false
@Output() commentCreated = new EventEmitter<VideoCommentCreate>()
+ @Output() cancel = new EventEmitter()
- @ViewChild('visitorModal') visitorModal: NgbModal
- @ViewChild('textarea') textareaElement: ElementRef
+ @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal
+ @ViewChild('textarea', { static: true }) textareaElement: ElementRef
addingComment = false
this.router.navigate([ '/login' ])
}
+ cancelCommentReply () {
+ this.cancel.emit(null)
+ }
+
private addCommentReply (commentCreate: VideoCommentCreate) {
return this.videoCommentService
.addCommentReply(this.video.id, this.parentComment.id, commentCreate)