I'm inserting an iframe in ionic2 imported from a url of a page I've tried some if I leave and youtube also but like the google or preincipal I have to place link do not let me leave this error:
Refused to display 'http://soporte.estadisticassena.com/edis/www/engenn11le04ob08/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
this is the component:
import { Component } from '@angular/core';
import {SafeResourceUrl, DomSanitizer} from '@angular/platform-browser';
import { AlertController, LoadingController, NavController } from 'ionic-angular';
@Component({
selector: 'sena',
templateUrl: 'sena.html'
})
export class Sena{
url: SafeResourceUrl;
constructor(
public navCtrl: NavController,
private alertCtrl: AlertController,
public loadingCtrl: LoadingController,
public sanitizer: DomSanitizer
){
this.url = sanitizer.bypassSecurityTrustResourceUrl('https://www.google.com.co/');
}
}
This is the html:
<iframe class="iframe-sena" height="190" onload="this.width=screen.width" [src]="url" frameborder="0" ></iframe>
Thank you very much.