Hi
How the below code works
Thanks
Hi
How the below code works
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek ChadhaPosted May 27, 2024, 5:28 PM
In this example:
attendanceArrayis assumed to be the array containing the list of employees with propertiesempIdandempName.*ngFor="let item of attendanceArray"iterates over each item in theattendanceArray.[value]="item.empId"sets the value of eachto theempIdof the corresponding employee.{{ item.empName }}displays the name of each employee inside thetag.Make sure you have the necessary Angular imports and dependencies set up in your project for this syntax to work. Additionally, you may need to adjust the
ngModelbinding ([(ngModel)]="selectedEmployee") to suit your application's requirements.Jobin SPosted May 27, 2024, 4:10 PM
Hi Ramco,
if you Select Dropdown employeename then corresponding id to get using twoway databinding Concepts