The Employee object in my Angular app contains an array of Skill objects, like below:
export interface IEmployee {
id: number;
fullName: string;
skills: ISkill[];
}
Here is my Skill interface:
export interface ISkill {
skillName: string;
experienceInYears: number;
proficiency: string;
}
I am able to use interpolation to display employee details like so:
{{employee.fullName}}
Now, I am trying to display the employee's skill.
Below, I am able to display the first skill:
{{employee.skills[0]?.skillName}}
But I want to display all of the skills associated with that employee, not just the first one.
I think the solution might have something to do with ngFor, but not sure exactly how to implement it.
Can someone please tell me how I can loop through the skills array to display all skillName's in the above code?