I have an frontend app that I have connected to my backend it works well but when I delete the div with post it disappears unclear, I need to add some effects to it so I can see that the post really disappears in my eyes. I know it's not hard but I'm a newbie in Angular and this is my first frontend app
Delete Post Method:
deletePost1(id:number){
this.messageService.delete(id).subscribe(res => {
this.messages = this.messages.filter(item => item.id !== id);
console.log('Post deleted successfully!');
})
}
delete post method from service:
delete(id: number) {
return this.httpClient.delete(this.apiURL + 'api/message/' + id, this.httpOptions)
.pipe(
catchError(this.errorHandler)
)
}