Hi,
I am using Simon Reimler’s tutorial on locally storing images, available here.
My problem is that the images do not render back into the DOM upon loading the app. See my GitHub project: https://github.com/wilsonhobbs/lovett-app
Relevant files: js/controllers.js
, templates/digital-id-settings.html
, templates/digital-id.html
I believe it is in the $scope.addImage()
function, or in the $scope.onLoad()
function, as the images are not loading after quitting the app on iOS (I haven’t tested Android, but it is likely the same result).
Thanks for everyone’s help.
I ran into a similar problem last week. Did you make sure your code is saving the image URIs correctly? You should also console.log the images not just the function being called.
If so, then the issue is likely due to the scope not updating correctly. Try implementing a $scope.$apply() and/or reinstantiating the scope that is in charge of pulling the relevant image data. (Note that while doing this may fix your issue, it’s merely a quick way to determine what the actual problem is. After that, you should look into properly binding the scope so that it pulls correctly)
where should it save? mine are saving here: file:///var/mobile/Containers/Data/Application/74307F36-ED60-4BA5-B056-4E9B176D0CA6/Library/NoCloud/