title: The pipe 'reverse' could not be found
body: <p>My data is arranged in ascending order... and i want it in descending order. I am using angular4.
  For this i am using a reverse pipe. The code for the same is as below. The first time i used it...it worked ..but later from second time onwards it has started giving error as --> The pipe 'reverse' could not be found.</p>
  
  <p>This is were i referred the code from - </p>
  
  <p><a href="https://stackoverflow.com/questions/35703258/invert-angular-2-ngfor">Invert Angular 2 *ngFor</a></p>
  
  <p><strong>transaction.component.ts</strong></p>
  
  <pre><code> import { Pipe, PipeTransform } from '@angular/core';
  
   @Pipe({  
    name: 'reverse',
    pure:false
   })
  
  
  export class TransactionComponent implements OnInit ,PipeTransform{
  
  transform (values: any) {
   if (values) {
    return values.slice().reverse();
     }
    }
  
   .....//code
   }
  </code></pre>
  
  <p><strong>transaction.component.html</strong></p>
  
  <pre><code> &lt;tr *ngFor="let dat of result |reverse |  filter:filterdata| 
    paginate: { itemsPerPage: 5, currentPage: p };let i = index "&gt;
  </code></pre>