title: AngularJs: How to check whether a hyperlink is loaded fully and then perform next action
body: <p>Question is simple I just want to check whether the hyperlink is loaded fully or not inside the ng-click event.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div ng-click='clicked()'&gt;Click me&lt;/div&gt;
  </code></pre>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>$scope.clicked= function() {
  window.location='https://firstlink.com';
  //
  //when above wesbite page is fully loaded then go to below code and load the next link
  //
  window.location='https://secondlink.com';
  }
  </code></pre>
  
  <p><strong>NOTE:</strong></p>
  
  <p>I don't want to check whether the view is loaded or not, I want to check whether the URL is completely loaded or not.
  I've checked many articles and posts regarding this but all I'm getting is that how to check whether your angularjs application is loaded or not. I want to get an approach with which I can check that these URLs are loaded fully or not.
  Below are some questions I already gone through:</p>
  
  <p><a href="https://stackoverflow.com/questions/11125078/is-there-a-post-render-callback-for-angular-js-directive">Post render call for AngularJs</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15458609/how-to-execute-angularjs-controller-function-on-page-load">Execute AngularJs controller function on page load</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14968690/sending-event-when-angular-js-finished-loading">Sending event when angularjs finished loading</a></p>
  
  <p><a href="https://stackoverflow.com/questions/21715256/angularjs-event-to-call-after-content-is-loaded/30258904">Angularjs event to call after content is loaded</a></p>