简体   繁体   English

Angular 5如何处理从后端收到的HTML

[英]Angular 5 how to handle HTML received from backend

我从后端接收到HTML(带有Facebook登录名),但是可观察的对象试图解析它,然后才有机会对其进行任何处理...我无法向Google解释我的问题,因此即使是专业术语我正在尝试做的事,将会有很大的帮助...

You can set responseType in your request method 您可以在请求方法中设置responseType

this.http.post(url, body, { responseType: 'text' });

By default responseType is json and Angular try to parse it 默认情况下responseType是json并且Angular尝试解析它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以角度显示从后端 api 接收到的数据 - how can i show the data received from backend api in angular Angular HttpModule如何处理从远程API接收的不适当的数据 - angular HttpModule how to handle inappropriate received data from a remote API 如何处理来自后端的大量数据/记录并在 UI 中显示为 Angular - How to handle large no of data/records from backend and display in UI as Angular 如何显示在角度/ typescript UI处从后端收到的Java地图数据? - How to display java map data received from backend at angular /typescript UI? 如何在 Angular 中处理 LocaleDateTime 后端响应 - How to handle LocaleDateTime backend response in Angular 从后端获取图像 url,如何在 html 中以角度显示图像 - Getting image url from backend,how to show image in html in angular Angular 9:csv 从后端收到的日文字符未正确下载 - Angular 9: csv with Japanese characters received from backend not being downloaded properly Angular - 如何将接收到的 JSON 传递到 html 表中? - Angular - how to pass received JSON in to a html table? 如何将从angular接收到的数据传递到html前端? - How do i pass data received from angular to html front-end? 如何在 Angular 中收集从 WebApi 接收的数据 - How To Gather the Data In Angular Received From WebApi
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM