Angular / Ionic - controller only runs once

前端 未结 5 1734
無奈伤痛
無奈伤痛 2021-02-20 18:57

I\'m starting out with Angular through the Ionic Framework but I am failing to understand why the controller only runs once i.e. I change state, the controller runs, change to a

5条回答
  •  后悔当初
    2021-02-20 19:26

    Ionic has a cache mechanism inside. You can disable caching globally in your config function like this :

    $ionicConfigProvider.views.maxCache(0);
    

提交回复
热议问题