title: Angular material sorting don't wanna cooperate with my app
body: <p>I trying to make sorting in my app but ... list showing up but no sorting.
  I think the source is at my <code>@Input() data: string[];</code>.
  In constructor i need to do something like that:</p>
  
  <pre><code>sortedData: string[];
  constructor(public dialog: MatDialog) {
      this.sortedData = this.data.slice();
  }
  </code></pre>
  
  <p>There i getting error about undefined - slice can be done on undefined type. I tried to do some if's around it, but after it my list appears without sorting functionality.</p>