Checking for undefined in ngFor in Angular 6 We use ngFor loop in Angualr 6 for iterating through list of items.Before iterating we should check whether the collection used in the ngFor contains any elements.We can check if collection contains any elements by using the following syntax: names is a string colllection defined as: names:string[]; […]