getEmployees() {
return
this.http.get('/assets/employees.xml', { responseType: 'text' })
.pipe(switchMap(async xml => console.log(xml)));
}
Hi I am using angular httpclient to make a http get request from a spring controller which returns a XML response.
The problem, i have xml data in my typescript file and i display it as xml data by console.log() but i can't display it as xml data in xml file in angular, can i do this? it's my typescript code to catch my data.
你应该订阅 observable
...getEmployees().subscribe();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.