#### What is the expected behavior? Sorting should work correct. #### What is the current behavior? ``` <table *ngIf='true' mat-table [dataSource]="dataSource" matSort> ``` `*ngIf` makes sorting not work. #### What are the steps to reproduce? https://stackblitz.com/edit/angular-sn7pfz?file=app/table-sorting-example.html #### Which versions of Angular, Material, OS, TypeScript, browsers are affected? Angular = 7.2.2 Material = 7.3.0 OS = ALL TypeScript = ALL #### Is there anything else we should know?