Angular ViewChild custom sort selector
问题 I'm learning about angular ViewChild currently, but I seem to be missing something when using ViewChild to select custom reference variables from the DOM. In my template I have two tables: <mat-table #eventTable [dataSource]="eventDataSource" matSort> <mat-table #eventDateTable [dataSource]="dateEventDataSource" matSort> I am attempting to target them with a sort for each: @ViewChild('eventTable') eventTableSort: MatSort; @ViewChild('eventDateTable') eventDateTableSort: MatSort; Then I