0

There are many other controls in each row with this particular dropdown list. after a redirection, on ngInit, I have value in item, then I am setting the item's value in each row. everythin working fine. But for this dropdown list, just updating the item.duration model is not showing the selected value of the drop down list.

                 <td>
                  <select class="form-control" (change)="durationChange(item, $event.target.value)" [value]='item.duration'>
                    <option value="1">1 Month</option>
                    <option value="3">3 Months</option>
                    <option value="6">6 Months</option>
                  </select>
                </td>

enter image description here

1 Answer 1

1

use the ngModel

<select class="form-control" [(ngModel)] ="item.duration" (change)="durationChange(item, $event.target.value)" [value]='item.duration'>
Sign up to request clarification or add additional context in comments.

2 Comments

Such a quick accurate answer! Thank you very much :)
make sure to check this as answer if this helped :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.