Search code examples
javascriptangularjscordovaionic-frameworkcrosswalk-runtime

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?


Solution

  • 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);