How to reload an iframe when a button is pressed on Ionic

0

I want an iframe with a url to reload when a lower tabs menu is pressed in ionic, how would it be done?

home.html

<ion-content padding>
<iframe id="homei" src="http://mipagina.com/posts" frameborder=0 style="width: 100%; height: 100vh;"></iframe>
</ion-content>

I want that iframe to reload when a button is pressed on the tabs

tabs.html

<ion-tabs>
  <ion-tab [root]="tab1Root" tabTitle="home" tabIcon="home" ></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="info" tabIcon="information-circle"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
</ion-tabs>

I'm working with Ionic

Ionic:

ionic (Ionic CLI) : 4.2.1

System:

NodeJS : v8.12.0
npm    : 6.4.1
OS     : Windows 7

What I need is that if you press any of the buttons below, the iframe will reload with the page

    
asked by Pablo Reyes 07.11.2018 в 09:27
source

0 answers