Angular 2 : dropdown list as well as input text on same input
Answers
Answered by
0
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>
<form>
<div>
<label>Market Code:</label>
<input id = "Mcode" type="text" /></div>
<div><label>Market Name:</label>
<input id = "Mname" type="text" /></div>
need to bind and update like this
<div class="form-group">
<button class="btn btn-danger" ng-model="[(country.id)]" type="submit">Reset</button>
<button class="btn btn-success" ng-model="[(country.name)]" type="submit">Update</button></div>
</form>
<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>
<form>
<div>
<label>Market Code:</label>
<input id = "Mcode" type="text" /></div>
<div><label>Market Name:</label>
<input id = "Mname" type="text" /></div>
need to bind and update like this
<div class="form-group">
<button class="btn btn-danger" ng-model="[(country.id)]" type="submit">Reset</button>
<button class="btn btn-success" ng-model="[(country.name)]" type="submit">Update</button></div>
</form>
Similar questions
Political Science,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
India Languages,
1 year ago
Physics,
1 year ago