title: angularjs image src change when model changes
body: <p>I am rotating an image on the server and I was wondering how to show the image change on my page?</p>
  
  <p>I think I have to use $scope.$apply() but everytime I use it i get the error message "digest cycle in progress"</p>
  
  <p>template.html </p>
  
  <pre><code> &lt; img src='{{tempimagefilepath}}/&gt; &lt;!--image--&gt;
  </code></pre>
  
  <p>controller.js</p>
  
  <pre><code> photoalbumServ.rotate_photo(post).then(function(data) {
    //after server modifies photo
      $scope.tempimagefilepath = $scope.baseurl + "user_images/user_43/temp/123-temp.jpg";
       $scope.$apply();
      });
  </code></pre>
  
  <p>thanks</p>
  
  <p>Solution:</p>
  
  <p>My solution was changing the scope value {{tempimagefilepath}} so the image will change. That required me to constantly rename the file on the server when I rotate the image.</p>