Under the following scenario, when a client is selected, I would like to update in the gallery model. 如何使用选定的客户端更新画廊模型?
<form novalidate>
<div class="control-group">
<label for="galleryName">Gallery Name:</label>
<input value="{{gallery.galleryName}}" id="galleryName" type="text" ng-model="gallery.galleryName">
<p>{{gallery}}</p>
</div><!-- /control-group -->
<div class="control-group">
<label for="clientName">Client Name:</label>
<select name="client" ng-model="clientList" ng-options="client.id as client.clientName for client in clients" >
<option value="">Choose Client</option>
</select>
{{clientList}}
</div>
</form>
画廊模型示例:
{"id":"57","galleryName":"Sam","clientRef":"205","client":"245","favorited":"1","timestamp":"1374524146"}
我的目标是在更改 clientList 时更改“客户端”。