Hi folks,
<div *ngFor="let section of evaluations.SectionViewModels">
...............
..............
<th>Result</th>
<th>Rating</th>
...............
..............
<tr *ngFor="let skill of section.SkillViewModels">
<td>
<select [(ngModel)]="skill.Rating" (change)="onSelectResult($event.target.value, skill, section)" name="Rating123">
<option *ngFor="let resultRating of resultRatings" [value]="resultRating.ratingNum">{{ resultRating.result }}</option>
</select>
</td>
<td>{{skill.Rating }}</td>
</tr>
</div>
where
resultRatings: Rating[] = [
{ result: "-- Not Applicable --", ratingNum: 0 },
{ result: "Exceptional", ratingNum: 5 },
{ result: "Above Avg", ratingNum: 4 },
{ result: "Satisfactory", ratingNum: 3 },
{ result: "Below Avg", ratingNum: 2 },
{ result: "Unsatisfactory", ratingNum: 1 },
];
I want to display or selected Satisfactory in dropdownlist if ratingNum is 3 as skill.Rating.
I think ndModel is not looping correct me if i am wrong.
How to fix it?
I am waiting for your response.
Thanks in Advance!!!