title: How to use Date Pipes for some columns in PrimeNG table with dynamic number of columns
body: <p>I am trying to display a dynamic number of columns, and also trying to use a <code>&lt;ng-template ...</code> to specify how a cell is being rendered.But in my data set there are some fields belongs to date type. I want to format that fields using a date pipe.</p>
  
  <p>html file</p>
  
  <pre><code>&lt;ng-template pTemplate="body" let-rowData let-columns="columns"&gt;
        &lt;tr&gt;
          &lt;td *ngFor="let col of columns" [style.width]="col.width"&gt;
            {{rowData[col.field]| col?.pipe}}
          &lt;/td&gt;
        &lt;/tr&gt;
  &lt;/ng-template&gt;
  </code></pre>
  
  <p>typescript file (In the cols array, I would like to add another field like this.)</p>
  
  <pre><code> this.cols = [
        { field: 'no', header: 'No.', width: '50px',pipe:null },
        { field: 'createdDate', header: 'createdDate', width: '175px', pipe: 'date: \'dd/MM/yyyy\''},
        { field: 'deviceName', header: 'Device Name', width: '150px'}
      ];
  </code></pre>
  
  <p>I've tried this and it gives me template parsing errors.</p>
  
  <blockquote>
    <p>ERROR Error: Uncaught (in promise): Error: Template parse errors:</p>
  </blockquote>