title: How can I add an external file in Angular CLI?
body: <p>I am creating one application to get all the element details from an HTML file using the Angular CLI. I have used PHP to get file content but i am getting error: </p>
  
  <pre><code>./bodycontent/load.php file not found... zone.js:2933. 
  </code></pre>
  
  <p>How can we resolve this issue?</p>
  
  <pre><code>  +-- src //folder
    |  |  
    +  | +-- app //folder
        | +-- &gt;bodycontent//folder
               +-- bodycontent.component.spec.ts
               +-- bodycontent.component.ts
               +-- load.php
  </code></pre>
  
  <p>script:</p>
  
  <pre class="lang-ts prettyprint-override"><code>  import { Component, OnInit } from '@angular/core';
    import { Router } from '@angular/router';
    import * as jQuery from 'jquery';  
    import { Http, Response } from '@angular/http'; 
    @Component({
    selector: 'app-bodycontent',
    templateUrl: './bodycontent.component.html',
    styleUrls: ['./bodycontent.component.css']
    }) 
    export class BodycontentComponent implements OnInit { 
      public href: string = "";
      url: string = "asdf";
  
      constructor(private router : Router) {}
  
      ngOnInit() {
  
  
          this.href = this.router.url;
          console.log(this.router.url);
  
           let url = "https://www.testing.com/test.html"; 
  
           let arr= null;
           $.post(this.router.url+"/load.php", { url: url,async: false},
              function(html) {
  
                  $('#page').html(html); alert(html)
                  let links = $('a');
                  let title = $('a').attr('title');  
  
                  let arr=[];
                  for(let i=0; i &lt; links.length; i++)
                  {
                      arr.push(links[i]); 
                  }
                   alert(arr);  
          }  );
  
  }
  </code></pre>