Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Reset DOM/View on Switching State/Location

$
0
0

@azurikai wrote:

Hello IonicFrameworkForums!

I am currently working on an application where I am submitting a form (on page /feature/xxx), and on submitting that form, it takes me to the page where all entries to that form can be seen.

At the end of the createEntry function, I am changing the path with

$location.path("/feature/yyy");

and directly after that in the same function I want to clear the cache/history/whatever and reset the DOM for that view completely.

I thought that using

$ionicHistory.clearCache();

would work, but it doesn't seem to do anything.

Is there any way to just reset the DOM for this view before exiting? I've tried ordering it the opposite way, thus-so...

$ionicHistory.clearCache();
$location.path("/feature/xxx");

but that doesn't work either.

Or is there a way that when I navigate to the new state/location that I could ensure it is cleared when I visit it?

Thank you!

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles