I have a component in Angular 6.0.8, which only contain an iframe.
page.component.html:
<iframe [src]="url">
page.component.ts:
ngOnInit() {
this.url = this.route.snapshot.data['url];
}
Now, when I resize the window or click mouse outside of component (lost focus), angular will re-render it (lifecycle-hooks shows: DoCheck, AfterContentChecked, AfterViewChecked)
And browser will request the url in the iframe again, which is not what i supposed to.
How to prevent this behavior?