i need to bind values getting by an id..in html am passing one id based on that i need to fetch,bind and update.i am not able to find out what am missingmy htmlHide Copy Code
<form *ngFor="let country of Countrylist">
<div class="form-group">
<input type="text" ngControl="ID" [(ngModel)]="ID">
<button (click)="sendValues(ID)">Search</button>
<label>Market Name</label>
<input ngControl="MName" [(ngModel)]="country.MName">
<label>Market Code</label>
<input ngControl="MCode" [(ngModel)]="country.MCode">
</div>
</form>
component.tsHide Copy Code
sendValues(ID) {
this._httpService.Searchcode(ID)
.subscribe(response => {
this.resmessage = response;
});
}
service.tsHide Copy Code
Searchcode(ID)
{
var header = new Headers();
header.append('Content-type', 'application/json');
return this._http.get("http://uraxapiservicepoc2test.azurewebsites.net/api/market/1",{headers:header})
.map((response:Response)=>response.json());
};
}