title: Angular 2 - Number to String Conversion using pipe
body: <p>I am trying to convert a number value to a string in angular 2 using typescript within a pipe. It complains </p>
  
  <blockquote>
    <p>Type string is not assignable to type number</p>
  </blockquote>
  
  <p>. My pipe is as follows.</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  
  @Pipe({ name: 'pxsuffix'
  
  }) export class pxsuffix implements PipeTransform {
  
  transform(input: number): number {
  
  if ((input &gt; 0)) {
      input = input.toString(),
  }
  
  return (
      input = input + 'px',
  
  );
  }
  }
  </code></pre>