Clientlist.service.ts角度2:ドロップダウンにGETサービス応答データをバインドする方法
getClientList()
{
let headers = new Headers();
headers.append('Content-Type', 'application/json');
let authToken = localStorage.getItem('auth_token');
console.log(authToken);
headers.append('X-auth-Token', authToken)
return this._http.get('http://localhost:8080/api/v1/client/list?isClient=Y', {headers})
.map((res) => {
var clientList = res;
console.log(clientList);
})
}
応答:ここ
[{"userId":"mind.com","clientCode":"75","clientName":"ABC COMPANY, THE"},{"userId":"mind.com","clientCode":"51","clientName":"infotech"}]
私は今、どのように、clientListにクライアントのリストを取得しています私は角度2.pleaseのドロップダウンにこの応答をバインドできますか?
「[角度2]で「選択」で新しい選択を取得するにはどうすればよいですか?](http://stackoverflow.com/questions/33700266/how-can-i-get-new-selection-in- angle-2で選択) –