title: Cross domain HTML parsing using AngularJS
body: <p>We are working on java project in which backend is java + spring and fronted is angular 2 + HTML. </p>
  
  <p>I want to do cross domain html parsing but <strong>we don't have permission to access external links on server side as we have some security issues for outsite domains</strong>, so we have to get the DOM content of link on client side using jquery. </p>
  
  <p>I have tried these:</p>
  
  <pre><code>var url = "http://xyz.aspx";
  
  $http({
      method: 'JSONP',
      url: url,
      params: {
          format: 'jsonp',
          json_callback: 'JSON_CALLBACK'
      }
  }).
  success(function(response) {
      $scope.test = response;
  }).
  error(function(status) {
      //your code when fails
  });
  </code></pre>
  
  <p>The external link which I need to parse contains many <code>href</code> links. I also need to parse content of those links.</p>
  
  <p>Have tried above mentioned code:</p>
  
  <blockquote>
    <p>getting error in console - Uncaught SyntaxError: Unexpected token &lt; on
    xyz.aspx page</p>
  </blockquote>
  
  <p>What will be best solution to get content of the pages and pass to server side for parsing?</p>