Angular - 从Observable <any>转换为Observable <calendareventuserconnection>

时间:2018-02-27 12:39:08

标签: angular observable

我在Angular 5应用程序中使用此服务方法:

createDateUserConnection(calendarEventUserConnection: CalendarEventUserConnection): Observable<any> {
    let creationIndex: number = 0;
    let url: string = environment.apiEndpoint + 'calendareventuserconnections/calendareventuserconnection/' + calendarEventUserConnection.calendarEvent.id + '/' + creationIndex;
    return this.http.post(url, calendarEventUserConnection, this.options);
}

我想将此方法的返回类型从Observable<any>转换为Observable<CalendarEventUserConnection>。有没有办法以简单的方式做到这一点?

0 个答案:

没有答案