title: AngularJS - Get image from a URL and display it HTML side
body: <p>In my Angular application, I am getting the image name from the database and then storing it in local storage when a user logs in.</p>
  
  <p>Now after login, the page to be redirected is loaded without the application being refreshed.</p>
  
  <p>And on that page, I want to show the image which I have stored in local storage.</p>
  
  <pre><code>if (localStorage.getItem('logo') != undefined) 
          $rootScope.logo = "http://somewebsite.com/"+localStorage.getItem('logo');
  </code></pre>
  
  <p>Now, in HTML, </p>
  
  <pre><code>&lt;img src="{{logo}}" &gt;
  </code></pre>
  
  <p>So the problem is, when I login, even if the image name is there in local storage, the image is being displayed as broken. and when I reload the application, it shows the image.
  So I concluded that the URL of the file is not being called because the application is not being reloaded after login.</p>
  
  <p>So is there any method through which I can load the image without reloading the application?</p>