I'm creating an app for events with Ionic and Cordova. On the main screen you get an overview of all your events and an indicator if you're going or not per event.
When you select an event you can change if you're participating. When you do so, i send a post request to my server and redirect the user to the main screen again. I do this with $ionicHistory.clearCache().then(function(){ $state.go('main.eventOverview'}) to make sure the data cache is reloaded if something changes as answered in this question That works just fine but my problem is the following:
If an event is updated and you get redirected to the homepage the indicator is correct. If you select the same event again, you see the non-updated event. If you go back to the overview and back again to that same event you get the updated event.
So the detail view only updates the second time you visit the view. I could set the cache-view to false so it updates every time i visit the view but that makes for a lot of unnecessary requests. Any help is welcome :)