Nativescript with Angular error when using HttpClient

六月ゝ 毕业季﹏ 提交于 2019-12-06 11:23:08

I ran into the same problem and it seems that I found the solution. The basic problem in Nativescript with Angular's http module seems to be that it overwrites the global.__extends function upon importing it the first time.

Importing NativeScriptHttpClientModule first (in app.module.ts) should fix this.

Since it does not help for your check if your nativescript-angular module is up-to-date or you could replicate its solution by hand:

const cachedExtends = global.__extends;
import { HttpClient } from '@angular/common/http';
global.__extends = cachedExtends;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!