Проблема в том, что я вижу, что данные возвращаются в запросе из браузера, но они никогда не достигают того места, где я хочу, однако запрос http get завершается неудачно и выдает ошибку, которую я поставил ниже, я уже включил обязательные полифилы, которые радыукажите здесь, если требуется.
Ошибка В браузере IE11 возникла серьезная проблема с унаследованным приложением angular7,
HTML1300: Navigation occurred. localhost:4200 DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337 localhost:4200 Angular is running in the development mode. Call enableProdMode() to enable the production mode. TypeError: Object doesn't support this action {
[functions]: ,
__proto__: {
[functions]: ,
__proto__: {
[functions]: ,
__proto__: { },
message: "",
name: "Error",
Symbol(INITIAL_VALUE)_h.02cxvy0t1nq: undefined,
Symbol(rxSubscriber)_g.02cxvy0t1nq: undefined
},
message: "",
name: "TypeError",
Symbol(INITIAL_VALUE)_h.02cxvy0t1nq: undefined,
Symbol(rxSubscriber)_g.02cxvy0t1nq: undefined
},
description: "Object doesn't support this action",
message: "Object doesn't support this action",
name: "TypeError",
number: -2146827843,
stack: "TypeError: Object doesn't support this action at Anonymous function (http://localhost:4200/main.js:7070:17) at TapSubscriber.prototype._next (http://localhost:4200/vendor.js:123833:13) at Subscriber.prototype.next (http://localhost:4200/vendor.js:115824:13) at TapSubscriber.prototype._next (http://localhost:4200/vendor.js:123839:9) at Subscriber.prototype.next (http://localhost:4200/vendor.js:115824:13) at onLoad (http://localhost:4200/vendor.js:13397:21) at ZoneDelegate.prototype.invokeTask (http://localhost:4200/polyfills.js:8075:13) at onInvokeTask (http://localhost:4200/vendor.js:58822:17) at ZoneDelegate.prototype.invokeTask (http://localhost:4200/polyfills.js:8075:13) at Zone.prototype.runTask (http://localhost:4200/polyfills.js:7848:21)",
Symbol(INITIAL_VALUE)_h.02cxvy0t1nq: undefined,
Symbol(rxSubscriber)_g.02cxvy0t1nq: undefined }
Вот фрагмент кодагде начинается проблема,
public myCompanyGet(observe?: 'body', reportProgress?: boolean): Observable<Array<myCompany>>;
public myCompanyGet(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<myCompany>>>;
public myCompanyGet(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<myCompany>>>;
public myCompanyGet(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
let headers = this.defaultHeaders;
// authentication (oauth2) required
if (this.configuration.accessToken) {
let accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
let httpHeaderAccepts: string[] = [
'application/json',
'text/json',
'application/xml',
'text/xml'
];
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
// to determine the Content-Type header
let consumes: string[] = [
];
return this.httpClient.get<Array<myCompany>>(`${this.basePath}/api/myController/myMethod`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
).pipe(
catchError(error => {
console.log(error) // this is where I am getting error
return null
})
);
}