Hi
How the below code works
Code
Name
{{ item.empName }}Thanks
Hi
How the below code works
Name
{{ item.empName }}Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek ChadhaRank #402 · 6.2K reputationPosted May 27, 2024, 1:28 PM EDT
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 SRank #886 · 2.4K reputationPosted May 27, 2024, 12:10 PM EDT
Hi Ramco,
if you Select Dropdown employeename then corresponding id to get using twoway databinding Concepts