Angular matSort does not sort July 21, 2023 by Tarik If you use “*ngIf” to initialy hide the table container in your template, the viewchield will be undefined.