initial commit

This commit is contained in:
2021-10-03 17:40:30 +02:00
commit 4db665a4c0
97 changed files with 19365 additions and 0 deletions
@@ -0,0 +1,29 @@
import { Component, OnInit, Input } from '@angular/core';
import { CommentService } from '../../services/comment.service';
@Component({
selector: 'ui-commentcount',
templateUrl: './commentcount.ui.html',
styleUrls: [ './commentcount.ui.scss' ]
})
export class UiCommentCount implements OnInit {
count: number;
@Input() target: number;
@Input() parent: number;
constructor(private commentService: CommentService) { }
ngOnInit(): void {
if (this.target && this.parent) {
this.commentService.countParent(this.target, this.parent).subscribe((data) => {
this.count = +data;
});
} else if (this.target) {
this.commentService.count(this.target).subscribe((data) => {
this.count = +data;
});
}
}
}