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
+10 -7
View File
@@ -7,14 +7,14 @@ import { CommentService } from '../../services/comment.service';
@Component({
selector: 'page-comment',
templateUrl: './comment.page.html',
styleUrls: [ './comment.page.scss' ]
styleUrls: ['./comment.page.scss']
})
export class PageComment implements OnInit {
id: number;
comment: any;
notfound: boolean = false;
ignoreSubcomments: string[] = [ 'entry' ];
ignoreSubcomments: string[] = ['entry'];
constructor(private commentService: CommentService,
private route: ActivatedRoute) { }
@@ -22,11 +22,14 @@ export class PageComment implements OnInit {
ngOnInit(): void {
this.id = +this.route.snapshot.paramMap.get('id');
this.commentService.getComment(this.id).subscribe((data) => {
this.comment = data;
}, (error) => {
if (error.status == 404) {
this.notfound = true;
this.commentService.getComment(this.id).subscribe({
next: (data) => {
this.comment = data;
},
error: (error) => {
if (error.status == 404) {
this.notfound = true;
}
}
})
}