I can receive the XML File using HTTP get method and pass it as a Blob. I can't use the window.open method as it opens the XML file in the web browser.
I know there is a FileSaver component for AngularJS but it does not work in Angular2.
Please Help
This is my service call.
public downloadXMLFile(): Promise<Blob> {
return this.http.get('this.downloadURL').toPromise()
.then((r: Response) => new Blob([r.text()], {type: 'application/xml'}))
.catch(error => console.log(error));
}