I try to have a PDF viewer inside of a component.
For dynamically changing the PDF document within a sanitizer I need to set it by an attribute with [].
That is OK with img.
<img src="assets/pic.jpg"/>
<img [src]="'assets/pic.jpg'"/>
But NOT with object.
<object data="assets/test.pdf" type="application/pdf" width="300" height="200"></object>
<object [data]="'assets/test.pdf'" type="application/pdf" width="300" height="200"></object>
Why is that?
How can I set data dynamically as a result of a function.