Just started diving into Angular and practicing coding with it while following video tutorials. However, I've stumbled upon something in my code that has left me puzzled.
I'm curious about the significance of the line "employees: Employee[]" in the component file.
Below is my model code:
export class Employee{
id: number;
name: string;
gender: string;
phoneNumber: number;
contactPreference: string;
dateOfBirth: Date;
department: string;
isActive: boolean;
photoPath: string;
}
And here's my component snippet containing employees data:
employees: Employee[]=[{
id: 1,
name: 'Kennedy',
gender: 'Male',
phoneNumber: 123,
contactPreference: 'Email',
dateOfBirth: new Date('10/25/2019'),
department: 'IT',
isActive: true,
photoPath: 'http://www.landscapingbydesign.com.au/wp-content/uploads/2018/11/img-person-placeholder-300x300.jpg'
},
Appreciate your help in advance!