다음 코드는 id에 대한 옵션 이름을 수행합니다.선택한 ng-options 옵션의 이름을 사용자 지정 이름으로 변경할 수 있습니까?
<select ng-model="vm.ships" ng-change="vm.updateShip()" data-ng-options="ship as ship._id for ship in vm.readyships">
Q는 : 어떻게 이름이 뭔가 할 수 있습니다 "배 ship.id
은 (ship.to
) 준비가?"
도 ng-options로 할 수 있습니까?
는 결과를 원 :
<option value="0" selected="selected" label="57e261">ship 57e261 is ready (sweden) </option>
업데이트 : to
이 array
의 일부인 경우
변수 ship.to
이
은 그래서 선박 ID가에 준비가 표시됩니다? – maria