title: How to get data in angular Data tables?
body: <p>I am a newbie on angular , I am calling a php api to fetch the data from database
  Api is working fine and showing me data on console now i want to print that data on my data table. What Should I do?</p>
  
  <p>here is my .ts file code</p>
  
  <pre><code> fetchRollHeader(){
     var apiurl = 'http://localhost/abc/Controller/abc.php';
  
      var data = new FormData();
      data.append('data', 'fetchRollHeader');
      data.append('roll_id', this.roll_id);
  
        return this.http.post&lt;any&gt;(apiurl, data)
  
            .pipe(map((response: any) =&gt; response))
            .subscribe(
                  data =&gt; {
                if(data['response_type'] != undefined &amp;&amp; data['response_type'] == 'Error'){
                  data.append('roll_id_demo', this.roll_id_demo);
  
                      if(data['response'] == 29){
                      }else if(data['response'] == 8 || data['response'] == 9 || data['response'] == 10){
                        this.router.navigate(['login']);
                      }else{
                        alert(data['response_value']);
  
                      }
                  }else{
                    this.customers = data;
  
  
                  }
                    console.log(data);
  
                  },
                  error =&gt; {
                      console.log("Error", error);
                  }
              ); 
    }
  </code></pre>
  
  <p>and this is how m calling the data in table but no value is showing up</p>
  
  <pre><code>&lt;tr  *ngFor="let item of customers" &gt;
        &lt;td   &gt;{{item.roll_id_demo}}&lt;/td&gt;
  </code></pre>