configuration option for type of PDF viewer fixes #337

This commit is contained in:
jonaswinkler
2021-01-14 13:35:21 +01:00
parent 244775c264
commit af58998e44
11 changed files with 165 additions and 91 deletions

View File

@@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
@Pipe({
name: 'safe'
})
export class SafePipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) { }
transform(url) {
if (url == null) {
return this.sanitizer.bypassSecurityTrustResourceUrl("")
} else {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}
}