import {Component, ElementRef, Input} from '@angular/core';
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
//Usage :: `
@Component({
selector: 'i-frame',
template: `
`
})
export class IFrameComponent {
public safeUrl: SafeResourceUrl;
@Input() url ;
constructor(private sanitizer: DomSanitizer) {
}
ngOnInit() {
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
//console.info("URL:" + this.safeUrl);
}
}