Why is this deprecated? and how is the correct form?
getPeopleFunction() {
this.peopleService.getPeopleService().subscribe(
(data) => {
console.log(data);
},
(error) => {
console.log(error);
}
);
}
CodePudding user response:
You should use this format now:
this.peopleService.getPeopleService().subscribe({
next: (v) => console.log(v),
error: (e) => console.error(e),
complete: () => console.info('complete')
})