Rohit
Rohit

Reputation: 1

how to stop reloading of a page on go back in ionic 3 angular 4

I have two pages(page1 & page2), on page1 there are two iframe in which pre define urls are loaded then I navigate to page2 and as come back to page1 from page2, both the iframe start reloading.

I want to stop this reloading of iframe. Is this possible in ionic?

Upvotes: 0

Views: 1814

Answers (1)

Taylor Rahul
Taylor Rahul

Reputation: 729

try to put your code in "ngOnInit" or in page "constructor" if you have used ionViewWillEnter. This is called only once the page is initiated.

Also try to ignore NavController push function while navigating from page2 to page1. use ionic default back button or use the NavController Pop function to navigate from page 2 to page 1.

Upvotes: 1

Related Questions