I'm trying to use the Object html tag to display a PDF that i made server side, but when i hard code the url it works and when i put it in a variable it gives me an Angular error and nothing is shown :
unsafe value used in a resource URL context
i tried using the sanitizer first but i read that it should be used only with tags that support href / src in my case it's data like this :
<object data="{{pdfSrc}}" type="application/pdf" width="100%" height="100%">
</object><br>
Here is what i tried first :
pdfSrc: any =this.sanitizer.bypassSecurityTrustUrl('http://my_url.com') ;
thank you