To make sure that the HTTP request is actually being made, you need to subscribe to the returned observable in your component. You can do this by adding .subscribe() to the end of each method in your component file:
createNote(event: any) {
this.notesService.createNote(this.note).subscribe();
}
updateNote(event: any, note: INotes) {
this.notesService.updateNote(note).subscribe();
}
deleteNote(event: any, _id: string) {
this.notesService.deleteNote(_id).subscribe();
}
Note that you can also add a callback function to subscribe() to handle the response from the server, or to handle any errors that might occur. For example:
createNote(event: any) {
this.notesService.createNote(this.note).subscribe(
response => {
console.log('Note created successfully');
},
error => {
console.error('Error creating note:', error);
}
);
}