1constructor(private sanitizer: DomSanitizer){}
2
3 generateDownloadJsonUri() {
4 var theJSON = JSON.stringify(this.resJsonResponse);
5 var uri = this.sanitizer.bypassSecurityTrustUrl("data:text/json;charset=UTF-8," + encodeURIComponent(theJSON));
6 this.downloadJsonHref = uri;
7 }
8