parseString undefined in angular 6 using xml2js
问题 I cannot get the xml2js code to work so far using angular 6. I have a service.ts returning xml however when calling xml2js.parseString to convert to json I consistently get an undefined error. "core.js:1673 ERROR TypeError: Cannot read property 'parseString' of undefined " service.ts import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, of } from 'rxjs'; import { map, filter, catchError, mergeMap } from 'rxjs/operators'; import {