title: Display number in Million or Thousand format in angular 4
body: <p>I am trying to display number format in my angular 4 application. Basically what i am looking at is if the number is in 12.23 millions then it should display For e.g
  12.2M (One decimal place)</p>
  
  <p>If the number is 50,000.123 then 50.1K</p>
  
  <p>How do i achieve that in angular. Do I need to write a directive ? Are there any inbuilt pipes in angular ?</p>
  
  <p>structure</p>
  
  <pre><code>export interface NpvResults  {
  
              captiveInsYear: number[];
              captiveInsPremiumPaid: number[];
              captiveInsTaxDeduction: number[];
              captiveInsLoanToParent: number[];
              captiveInsCapitalContribution: number[];
              captiveDividentDistribution: number[];
              captiveInsTerminalValue: number[];
  
          }
  </code></pre>
  
  <p>The array is initialized to the following value</p>
  
  <pre><code>this.sourceResults.captiveInsPremiumPaid = [1,2,3,4,5];
  </code></pre>
  
  <p>The html</p>
  
  <pre><code>&lt;td *ngFor= "let item of NpvResults.captiveInsPremiumPaid" &gt;{{item}}&lt;/td&gt;
  </code></pre>