update dependencies, migrate subscribe, add submit type to buttons

This commit is contained in:
2024-02-26 15:11:48 +01:00
parent 43da1441d9
commit 31dc5e5c25
31 changed files with 4388 additions and 5047 deletions
+9 -5
View File
@@ -4,7 +4,7 @@ import { CommentService } from '../../services/comment.service';
@Component({
selector: 'ui-commentcount',
templateUrl: './commentcount.ui.html',
styleUrls: [ './commentcount.ui.scss' ]
styleUrls: ['./commentcount.ui.scss']
})
export class UiCommentCount implements OnInit {
@@ -16,12 +16,16 @@ export class UiCommentCount implements OnInit {
ngOnInit(): void {
if (this.target && this.parent) {
this.commentService.countParent(this.target, this.parent).subscribe((data) => {
this.count = +data;
this.commentService.countParent(this.target, this.parent).subscribe({
next: (data) => {
this.count = +data;
}
});
} else if (this.target) {
this.commentService.count(this.target).subscribe((data) => {
this.count = +data;
this.commentService.count(this.target).subscribe({
next: (data) => {
this.count = +data;
}
});
}
}