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

How to reload state afer changing picture

$
0
0

@Ionicoser wrote:

Hi all

Quick facts: User takes a new profile picture. Same Picturename (caching problem, profileid.jpg) - Trying to reload the state to display the new picutre.

This works:
$state.go('app.settings', {id: profileId}, { reload: true, inherit: false, notify: true });

This dosn't works:
$state.go('app.settings', {id: profileId});

In the second try my navbar is hidden and some parts of the layxout are destoryed.

I've also tried it by using a timestamp like

$scope.timestamp = new Date().getTime(); and reset $scope.timestamp after taking the picture.

The View:
<div class="profilepic" ng-click="takeAPicture()" style="background-image:url('{{dataDirectory}}/{currentProfile.picture}}?revision={{timestamp}}');"></div>

Maybe someone can help me to refresh the picture? Any ideas?

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>