title: Angular 2 Pipe argument fails
body: <p>I am using ionic 2 and trying to sort my array in a <code>*ngFor=""</code>.</p>
  
  <p>Sadly it throws me an error and I don't know why, here is the <a href="https://forum.ionicframework.com/t/order-a-list/55389/2" rel="nofollow noreferrer">related post</a> </p>
  
  <p>My array of objects looks like this : <a href="https://i.stack.imgur.com/r02MO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r02MO.png" alt="this"></a></p>
  
  <p>My pipe looks like this : </p>
  
  <pre><code>import {Injectable, Pipe} from '@angular/core';
  import * as _ from 'lodash';
  
  @Pipe({ name: 'order-by' })
  export class OrderByPipe {
    transform(array, args) {
      return _.sortBy(array, args);
    }
  }
  </code></pre>
  
  <p>My *ngFor : </p>
  
  <pre><code>&lt;button ion-item *ngFor="let user of users | order-by:'likes'" &gt;
  </code></pre>
  
  <h1>Error</h1>
  
  <pre><code>TypeError: Cannot read property 'toUpperCase' of undefined ("
  
      &lt;ion-list&gt;
              &lt;button ion-item [ERROR -&gt;]*ngFor="let user of users | order-by: 'likes'"&gt;
  </code></pre>
  
  <p>Other had the same <a href="https://github.com/yarnpkg/yarn/issues/836" rel="nofollow noreferrer">problem</a>. Don't know why it doesn't work .. </p>
  
  <p>Do yu have maybe another pipe to sort arrays ? :) Thank you ! </p>