title: Truncating text with Pipes in Angular 4 and PrimeNg
body: <p>I'm trying to display the output of a data-table with the limit of 150 characters.
  I have a pipe that is defined as:</p>
  
  <pre><code>transform(value: string, args: string[]): string {
      const limit = args.length &gt; 0 ? parseInt(args[0], 10) : 20;
      const trail = args.length &gt; 1 ? args[1] : '...';
      return value.length &gt; limit ? value.substring(0, limit) + trail : value;
     }
  </code></pre>
  
  <p>My HTML is:</p>
  
  <pre><code>p-column field="description" header="Description"&gt;
              &lt;ng-template let-col let-row="rowData" let-ri="rowIndex" pTemplate="body" &gt;
                  &lt;span #z&gt;{{ z | truncate:[20] }}&lt;/span&gt;
              &lt;/ng-template&gt;
          &lt;/p-column&gt;
  </code></pre>
  
  <p>This is the output I see on my webpage:</p>
  
  <pre><code>[object HTMLSpanElement]
  </code></pre>