title: Not able to fetch data in codeigniter from angular 4 view
body: <p>I am using angular 4 for front end and CodeIgniter at the backend. At the angular end, there is a form that has some input values and images that I need to fetch at CodeIgniter end so that they can be saved in the database. But for an image, I wish to save it in a folder and then save its path in a database</p>
  
  <p>Form code</p>
  
  <pre><code>&lt;form ngNativeValidate [formGroup]="form" (ngSubmit)="onSubmitadd()" class="form-horizontal"&gt;
      &lt;input type="text" class="form-control"  name="title" id="title" formControlName="title" minlength="10" maxlength="150" required&gt;
  
      &lt;input type="file" id="avatar" (change)="onFileChange($event)" #fileInput required&gt;
  
      &lt;button type="submit"  class="demo-loading-btn btn red savebtn"&gt;Save&lt;/button&gt;
  &lt;/form&gt;
  
  
  
   onSubmitadd() {
      const formModel = this.form.value;
      this.loading = true;
       this.http.post('http://www.localhost/litehires/company/profile',formModel ,{
        })
          .subscribe(
            res =&gt; {
              console.log(res);
              $("#add-data .close").click();
              this.listBanner();
          },
            err =&gt; {
              console.log("Error occured");
            }
          );
    }
  </code></pre>
  
  <p>Controller Code</p>
  
  <pre><code>public function profile()   
        {  
          $res = $this-&gt;input-&gt;post('formModel');
          return $res;
        }
  </code></pre>
  
  <p>While checking in a console the data is getting passed in formModel but I am not able to fetch the data in a controller. Can anyone please tell how to fetch the data and image so that I can process it further</p>