ı am using ionic and angular full calendar . And ı want to make Http request but ı face this error.
service.ts
import { map } from 'rxjs/operators';
getEvents()
{
return this.http.get('http://localhost/api/lessons') .pipe(
map(response => {
return response.map((data) => { **//ı have error about this line**
return {...data,start: data.start_time};
});
})
);
}
home.ts
ngOnInit(){
this.service.getEvents().subscribe(events => {
this.events = events;
console.log(this.events);
});
}
home.html
<full-calendar
defaultView="dayGridMonth"
[plugins]="calendarPlugins"
[weekends]="true"
[events]="events"
></full-calendar>
ı am facing error like TypeError: response.map is not a function . So please help me.