Received an array of Event type from the server.
public int Id { get; set; }
public string Name { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
For Angular and TypeScript, I need to transform it into the following class due to multiple pickers in the UI:
id: number;
name: string;
startDate: Date;
startTime: Date;
endDate: Date;
endDatetime: Date;
I am looking for a way to customize the mapping in my event.service.ts before subscribing to it in my component. How can this be achieved?
getEvents(): Observable<Event[]> {
return this.http.get<Event[]>(this.eventsUrl);
}