Sujeet Raman

Sujeet Raman

  • 859
  • 927
  • 357.5k

How to edit dropdown selected items in Angular 2?

Apr 24 2017 7:29 AM
hi i am new to angular 2..here i am trying to edit selected item in Dropdown.but how can i do this?
 
<label>Select Market</label>
<select class="user-preselect btn-add" style="width: 90%;height: 34px;">
<option value="0" selected="selected">ADD Market</option>
<option *ngFor="let country of Countrylist" value={{country.id}} >{{country.marketname}}</option>
</select>
 this is Dropdown. i need to bind the selected items and do edit update like below image 
 
<form>

<div >
<label>Market Code:</label>
<input id="Mcode" type="text" /></div>

<div><label>Market Name:</label>
<input id="Mname" type="text" /></div>

<div class="form-group">
<button class="btn btn-danger" type="submit">Reset</button>
<button class="btn btn-success" type="submit">Update</button></div>
</form>
 how i can achive this please help

Answers (1)