title: Why sorting is not working on some of the columns?
body: <p>I have used column sorting on table. It's working fine on first name and last name column but on dl and dl score it is not working. Can you look into it and help me fix it.</p>
  <p>You can view here: <a href="https://stackblitz.com/edit/angular-ivy-87hi8i?file=src%2Fapp%2Fapp.component.html" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ivy-87hi8i?file=src%2Fapp%2Fapp.component.html</a></p>
  <pre><code>sort(property: any) {
      this.isDesc = !this.isDesc;
      this.column = property;
      let direction = this.isDesc ? 1 : -1;
      this.allUser.sort(function(
        a: { [x: string]: number },
        b: { [x: string]: number }
      ) {
        if (a[property] &lt; b[property]) {
          return -1 * direction;
        } else if (a[property] &gt; b[property]) {
          return 1 * direction;
        } else {
          return 0;
        }
      });
    }
  </code></pre>
  <p>markup</p>
  <pre><code>&lt;tr&gt;
  &lt;th *ngIf=&quot;!isEdit&quot;&gt;Edit&lt;/th&gt;
  &lt;th [ngClass]=&quot;{pointer: true, active:column=='first_name',desc:isDesc, asc:!isDesc}&quot;
  (click)=&quot;sort('first_name')&quot;&gt;First Name&lt;/th&gt;
  &lt;th [ngClass]=&quot;{pointer: true, active:column=='last_name',desc:isDesc, asc:!isDesc}&quot;
  (click)=&quot;sort('last_name')&quot;&gt;Last Name&lt;/th&gt;
  &lt;th&gt;Email&lt;/th&gt;
  &lt;th&gt;Gender&lt;/th&gt;
  &lt;th&gt;DOB&lt;/th&gt;
  &lt;th&gt;Impact&lt;/th&gt;
  &lt;th&gt;Score&lt;/th&gt;
  &lt;th [ngClass]=&quot;{pointer: true, active:column=='dl',desc:isDesc, asc:!isDesc}&quot; (click)=&quot;sort('dl')&quot;&gt;
  DL&lt;/th&gt;
  &lt;th [ngClass]=&quot;{pointer: true, active:column=='co_score',desc:isDesc, asc:!isDesc}&quot;
  (click)=&quot;sort('co_score')&quot;&gt;DL Score&lt;/th&gt;
  &lt;th&gt;&lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>