Hi
How to display list of names . I am trying like below
>
Code
Name
{{empName}} >TypeScript
form = new FormGroup({
empId: new FormControl(0),
empName: new FormControl(''),
empContactNo: new FormControl(''),
attendanceId: new FormControl(0),
attendanceDate: new FormControl(''),
inTime: new FormControl(''),
outTime: new FormControl(''),
isFullDay: new FormControl('')
});
get f(){
return this.form.controls;
}
getEmployee(){
this.empSrv.getallEmployee().subscribe((result: any)=>{
this.employeeArray = result.data;
})
}Thanks

Abhishek ChadhaRank #402 · 6.2K reputationPosted May 27, 2024, 10:22 AM EDT
To display a list of names from an array in HTML using Angular syntax, you can use the
*ngFordirective. Here's how you can modify your code:Jobin SRank #886 · 2.4K reputationPosted May 27, 2024, 5:26 AM EDT
Hi ramco,
{{item.empname}} try this
Ramco RamcoRank #462 · 5.4K reputationPosted May 27, 2024, 8:19 AM EDT
Hi
I am getting error - NG5002: Unexpected closing tag "option". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags [plugin angular-compiler]
getEmployee(){ this.empSrv.getallEmployee().subscribe((result: any)=>{ this.employeeArray = result.data; }) }Thanks