Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Previous data still present after $state.go() in Ionic Framework with Crosswalk

why is it after I fill up the necessary inputs then send to my server after sending I redirect user to some other page. When a user went back to that page, the info he filled still present in there. How can I fix this? It seems the info I filled is cached when in fact I didn't use such technology in my application. How can I clear the input data done before?

like image 724
user3569641 Avatar asked Feb 12 '23 00:02

user3569641


1 Answers

In the latest ionic release (v1.0.0-beta.14) they introduced view caching. See IonView docs for more infos on that.

You could deactivate caching in for your route like this

.state('your.state', {
                url: '/your/url',
                cache: false,
                views: {
                    // ...
                }
            })

or directly in your view

<ion-view cache-view="false" view-title="My Title!">

See ionNavView docs

Or you might even want to disable cache globally for testing:

$ionicConfigProvider.views.maxCache(0);
like image 109
tmaximini Avatar answered Feb 13 '23 15:02

tmaximini