Page Does Not Pop Off Stack When Back Button Pressed

I am loading a webpage with an iFrame. When I click any links on the website in the iFrame then hit the ionic back button, the page doesn’t pop off to the page before. It stays on my iframePage but says undefined. How do I make it pop off the stack instead of stay on my iframePage?