In the [data] attribute in the object tag, a method is called that returns a link to a PDF, which then the browsers default PODF viewer. The problem that I am encountering is that the PDF viewer keeps flashing because the method keeps getting called and returning the URL. Is there a way I can only fire this method once?
<div *ngSwitchCase="'pdf'"
id="pdf"
class="pdf">
<object style="width: 100%; height: 100%;"
[data]="returnEncodedLink()"> </object>
</div>