Angular 2 Sort table columns
I assume you are loading the data (selectedData) for this template asynchronously in the component’s class, so at the start it’s not yet returned form the service, hence selectedData = undefined. There are several things you can do to mitigate that: 1. Initialize the data in the component Set the selectedData class property to an empty array so … Read more